Reputation: 1
I want to add some values in my excel sheet , but when there is no value want hyphen instead of zero .
Here is my formula as below : =IFERROR(SUMIF(A1:A6,"="&VLOOKUP($F$3,A1:B6,1,FALSE),B1:B6),"-")
Upvotes: 0
Views: 438
Reputation: 5343
The formula for that'd be:
=IFERROR(IF(SUMIF(A1:A6,"="&VLOOKUP($F$3,A1:B6,1,FALSE),B1:B6)=0,"-",SUMIF(A1:A6,"="&VLOOKUP($F$3,A1:B6,1,FALSE),B1:B6)),"-")
But I suspect you just want to change the number format to ACCOUNTING... it automatically replaces zeros with hyphens.
Upvotes: 1