Reputation: 105
Below is part of a financial worksheet to calculate profit and loss.
Currently C19
shows £ 0.00
as there is no data in the next to calculate an answer.
I want cell C19
to return blank until such a point there is data in the next sheet to calculate an answer but NOT using custom number formats (as I am already using one that I would like to keep)
Custom number format already in use in cell C19
: + £ #,##0.00;- £ #,##0.00; 0.00
This is currently the formula in cell C19
: =SUMIF('SPREADS LOG'!A:A,"*OPEN*",'SPREADS LOG'!K:K)
Can anyone suggest the correct formula needed?
Upvotes: 0
Views: 733
Reputation: 1
To avoid changing formatting my go to when hiding zeros is to rely on the fact that divide by zero will produce an error. So =IFERROR(1/(1/value),"")
will produce blanks if value is ever zero and will otherwise produce the value. It avoids typing in a separate check for zero entries.
In the case in question it would just be:
=IFERROR(1/(1/SUMIF('SPREADS LOG'!A:A,"*OPEN*",'SPREADS LOG'!K:K)),"")
Upvotes: 0
Reputation: 397
I see 4 solutions:
Upvotes: 1
Reputation: 39
You can move the number format to TEXT formula:
=TEXT(SUMIF('SPREADS LOG'!A:A,"*OPEN*",'SPREADS LOG'!K:K);"+ £ #,##0.00;- £ #,##0.00; ")
There is a optimization problem using
IF(SUMIF(...)=0,",SUMIF())
since you'll end calculate the sum twice.
Upvotes: 1