Forum Discussion

packie's avatar
packie
Brass Contributor
Sep 01, 2024

Display result as a zero instead of a blank cell

Hi,

 

When the following formula have nothing to return a blank cell displays. 

 

COUNTIFS(Trades!$R$5:$R$1099,D37,Trades!$O$5:$O$1099,">0")

 

SUMIFS(Trades!$O$5:$O$1099, Trades!$R$5:$R$1099, D37)

 

What is needed to have a 0 instead of a blank shown

 

"Show a zero in cells that have zero value" under Options/Advanced; is already ticked.

 

Thanks

 

 

4 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    packie Both formulas return 0 for me if there's noting to count or sum. I suspect that you have a custom format (like General;General;) that suppresses zeros. Set the cell format to General and you should get zeros back.

    • packie's avatar
      packie
      Brass Contributor
      You are correct. The sheet Trades has the cell format set to General;General;

      I will want to keep the format General;General; though, is there a work around I could use?
      • packie 

        The format General;General; explicitly suppresses 0 values because the 3rd section (after the 2nd semicolon) is empty.

        I'd use General, as suggested by Riny_van_Eekelen but if you really want to, you could use General;General;General or General;General;0

Resources