Forum Discussion

TomHew1tt's avatar
TomHew1tt
Copper Contributor
Jun 26, 2023

IF FORMULA ONLY WORKS ABOVE CERTAIN VALUE

I am new to this and have an if formula which only works if the value of a cell is over £10,000 or if a certain cell is 0.

I've attached images below.

 

Can anyone help?

 

 

 

 

 

 

  • TomHew1tt 

    Since you have currency amounts with 2 decimal places, you should round to 2 decimal places in the comparison:

     

    =IF(ROUND(G37, 2)=ROUND(G47, 2), "Balanced", "Not Balanced")

     

    or

     

    =IF(ROUND(G37-G47, 2)=0, "Balanced", "Not Balanced")

  • mtarler's avatar
    mtarler
    Silver Contributor
    without having access to the sheet we can't tell for sure but there are a number of explanations for what you are seeing but the most likely is round-off errors: depending on the formulas if the 2 calculations have different round-off values (either due to how the calculation is done or due to digits of precision in excel) that are at lower decimal points so 9500.0111111 vs 9500.010001 but all you SEE is 9500.01
    for example if you try round(g37,2)=round(g47,2) does that work?

      • mtarler's avatar
        mtarler
        Silver Contributor
        if you can't attach the workbook here then you can share using Sharepoint, Onedrive, or other cloud solution and share a link here or you can private message it to me (click my icon and find message option) and then I can share it here. But please see if Hans' solution above better explains what I was trying to say.

Resources