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

Conditional formatting across sheets to highlight a cell based on greater than comparison


Suppose there are 2 sheets Run1 and Run2 in excel. Both have a column say PassCount. How can we compare PassCount on Run1 and Run2 for greater value such that, if PassCount in Run2 is higher than PassCount from Run1 then Run2 entry should be highlighted in green else it should be red

Run2

image

Run1 Run 1 is exactly the same sheet with different values.

Now, what I need is: If(C3 of sheet Run18 > C3 of sheet Run17) then highlight C3 of Run18 in green else highlight it in red. This will show if the current result is better than the previous result or not.


Solution

  • green color:

    =COUNTIF(C2, ">"&INDIRECT("Run18!C2"))
    

    red color:

    =COUNTIF(C2, "<="&INDIRECT("Run18!C2"))
    

    0