协助返回基于单元格填充数字的值

Assistance with returning value based on cell being populated with number

您好,感谢您看我的post。我是电子表格的超级菜鸟,但在我的助手多次设法忘记输入正确数据后,我需要在 Open Office Calc 中自动化部分成本电子表格。我们开始吧:

第 1 部分

Output is in cell D1.

I have a column of cells A1 to A10, if there is a number (any number) in one or more cells from A1 to A3 then I need the D1 to equal cell B1
+ 1. 

If there is also a number in A4 to A6 then this supercedes the previous formula and D1 will now be B1 + 2. 

Lastly if there is a number in A7 to A10 then again all previous code is superceded and D1 is now B1 + 3.

第 2 部分

I have cells C1 to C3. If D1 equals B1 + 1, C1 will equal D1 if greater than 3, else it will be 3. C2 and C3 must be 0 or empty.

If D1 equals B1 + 2, C2 will equal D1 if greater than 4, else it will be 4. C1 and C3 must also be 0 or empty.

If D1 equals B1 + 3, C3 will equal D1 if greater than 5, else it will be 5. C1 and C2 must also be 0 or empty.

对我来说,这似乎几乎是不可能的,我花了一整天的时间尝试学习 IF 和 ELSE 语句以及 ISNUMBER 和许多其他方法,但我 运行 别无选择。任何帮助或建议将不胜感激,如果我不清楚,请让我澄清任何一点。

找到一个可以放置其他公式的列,例如 E 列。将公式分成几部分会更容易。

在E1中,输入=IF(E4, 3, IF(E3, 2, IF(E2, 1, 0))).
在 E2 中,输入 =OR(ISNUMBER(A1),ISNUMBER(A2), ISNUMBER(A3)).
在 E3 中,输入 =OR(ISNUMBER(A4),ISNUMBER(A5), ISNUMBER(A6)).
在 E4 中,输入 =OR(ISNUMBER(A7),ISNUMBER(A8), ISNUMBER(A9), ISNUMBER(A10)).
那么 D1 的公式就是 =B1 + E1。这是问题的第 1 部分。

对于第 2 部分,不需要 "C2 and C3 must be 0 or empty" 的要求,因为如果 D1 等于 B1 + 1,它们将是空的。这就是所有需要的:

在C1中,输入=IF(E1=1, IF(D1>3, D1, 3), "").
在 C2 中,输入 =IF(E1=2, IF(D1>4, D1, 4), "").
在 C3 中,输入 =IF(E1=3, IF(D1>5, D1, 5), "").