Here is a table that I'm working with (an ascii art representation fo it):
|---|---------|-----------|--
| |A |B |
|---|---------------------|--
|1 |price |override |
|---|---------|-----------|--
|2 |10 | |
|---|---------|-----------|--
|3 |20 |100 |
|---|---------|-----------|--
|4 |30 | |
|---|---------|-----------|--
|5 |40 |90 |
|---|---------|-----------|--
|6 |50 | |
|---|---------|-----------|--
|7 |150 |280 | <-- SUMS
|---|---------|-----------|--
| | | |
column A has some prices, column B has an override price, if any. Rows 1 to 6 have the prices, and row 7 has sums.
Row 7 is calculated as "=SUM(A1:A7)"
I want to write a formula for cell B7 that will do the following:
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
My question: what formula will do the above?
I've looked at IF (cant figure out how to apply it on a range) and SUMIF(can't figure out how to get the "current cell" and "relative cell"), but I can't think of a way to do this. I'm a total novice at excel formulae.