Sum a row, while ignoring one cell?

Ref: Sheet columns D, E & F. (Billable Hours > Expenses > Data Analysis Fee)

D, E & F columns are formatted as number cells. Formuta in column F: =D23*35.85

I would like help editing the column F formula to ignore column E AND if column D is empty display a BLANK in column F instead of 0.00.

Thx.

Hallo

=IF(D23;D23*35.85;"")
2 Likes

Thank you. That is a lot simpler than what was in my head :smile:.

I never used before IF with only a reference or number in the first argument. Every day it’s possible to learn something good.
It will give TRUE for all number<>0, FALSE for 0, and #VALUE! for all text between quotes.
Text without quotes are seen as range names, from wich the value of the last cell is evaluated (see @erAck comment below).

1 Like

That’s not correct. If it is a named range (not single cell, but column or row vector) then the implicit intersection of the vector and the formula cell position is used, as with any cell range where a function or operator expects a single scalar value as parameter. For named ranges with relative references it depends on the relative cell position the named range was created on. If that happened to be on the last column or row of the vector then the last cell is evaluated.

1 Like

Just number format column F to not display 0 values:

General;-General;;
or
0.00;-0.00;;
or
[$$-409]#,##0.00;[RED]-[$$-409]#,##0.00;;

You get the idea… Note the empty third subformat.

The disadvantage with formulas like =IF(D23;D23*35.85;"") is that they need to be unnecessarily calculated and the empty string result can get in the way when attempting to do arithmetic calculations and produce #VALUE! errors.

1 Like