Search code examples
google-sheetsgoogle-sheets-formulags-conditional-formatting

Google Sheets can't make a formula that identifies cells having a 0 in it


I'm trying to make a formula that changes the color of a row based on the number in a cell. All of the numbers that I'm using are all in column G.

I got it to work by using Conditional Formatting, format cells if, the custom formula is, and then the formula =$G1=3 (and more formulas with the number going down each time). All of the formulas from =$G1=3 to =$G1=1 all work as I expect but when I try to use =$G1=0, all the rows that have either 0 in it or is just empty.

I have also tried to use =$G1="0" and that doesn't work either. I can get it to work if I use Format cell if, the text is exactly, 0 or Format cell if, is equal to, 0. But, using these only change the color of the cell that has 0 in any cell.

=$G1=3
=$G1=2
=$G1=1

Is there a way to make a formula that checks if a cell has 0 in it using a custom formula? Thanks for any answers.


Solution

  • try this custom formula:

    =($G1=0)*($G1<>"")
    

    0