Referring to the Excel table above we are comparing values in cell A1 and A2. Here we are checking two conditions with nested If Else function:. 1  If value in cell A1 is greater than value in cell A2. 2  If value in cell A2 is greater than value in cell A1.  If both condition not true and values in A1 and A2 are equal.