Forum Discussion

jjmi_'s avatar
jjmi_
Copper Contributor
Jun 12, 2019

IF function with calculations within it

Hello, 

 

I apologise if this has been already been posted but I could not find a similar query. 

 

I wanted to know if the IF forumla could contain calculations within it. 

 

My current formula works around some variation of this: IF(F3*0.03+f3=C3, true, false) which keeps returning a false value although I know the actual calculation is correct. 

 

To clarify, the value of F3 is 25.48 and the value of C3 is 26.55. Therefore, what I am trying to show is that F3*0.03+F3 = C3 (which is correct). 

 

I hope this makes sense and would really appreciate any advice anyone could provide! 

 

Thank you :) 

2 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    jjmi_ 

    Even with other values (e.g. 25.78 in F3 or like) it could return FALSE due to rounding / rounding error. Better to ROUND values before compare.

  • Rich99's avatar
    Rich99
    Iron Contributor
    Hi, The formula should work OK. Using the values you gave I get F3*0.03+F3 to = 26.2444 not 26.55.

    Rich