下面是我与(一个ASCII艺术表现FO IT)工作表:
|---|---------|-----------|--
| |A |B |
|---|---------------------|--
|1 |price |override |
|---|---------|-----------|--
|2 |10 | |
|---|---------|-----------|--
|3 |20 |100 |
|---|---------|-----------|--
|4 |30 | |
|---|---------|-----------|--
|5 |40 |90 |
|---|---------|-----------|--
|6 |50 | |
|---|---------|-----------|--
|7 |150 |280 | <-- SUMS
|---|---------|-----------|--
| | | |
列A具有一定的价格,B列有一个覆盖价格,如果有的话。 行1至6具有价格和行7的总和。
行7被计算为 “= SUM(A1:A7)”
我想写细胞B7,将做如下的公式:
for every cell in range A1:A7
if the override field for that price is blank
add the original price to the total
else
add the override price to the total
我的问题:什么样的公式将做到上面?
我已经看了IF(无法弄清楚如何将其应用在一个范围),SUMIF(无法弄清楚如何获得“当前小区”和“相对细胞”),但我不能想办法去做这个。 我在Excel公式总新手。