Search code examples
google-sheetsstring-formattinggoogle-sheets-formula

IF function returning "value_if_false" as a blank string instead of a blank number


=IF(AND(ISNUMBER(B17),ISNUMBER(H10)),B17-H10, "")  

My issue is that value_if_false is converting cells to strings and I'm looking for a way to return a blank number cell instead of a blank string cell.

All of the options I have tried will return "0", which is still a value, and is messing up my graphs, or polluting the data with non-numbers so it is not graphable.

I have tried Format>Number>Number, but it is not changing the cell type.


Solution

  • you can do this like:

    =IF(AND(ISNUMBER(B17), ISNUMBER(H10)), TEXT(B17-H10, "0"), )
    

    or like:

    =IF(AND(ISNUMBER(B17), ISNUMBER(H10)), TEXT(B17-H10, "#"), )