Home

IF function with calculations within it

%3CLINGO-SUB%20id%3D%22lingo-sub-689308%22%20slang%3D%22en-US%22%3EIF%20function%20with%20calculations%20within%20it%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-689308%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20apologise%20if%20this%20has%20been%20already%20been%20posted%20but%20I%20could%20not%20find%20a%20similar%20query.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20wanted%20to%20know%20if%20the%20IF%20forumla%20could%20contain%20calculations%20within%20it.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20current%20formula%20works%20around%20some%20variation%20of%20this%3A%20IF(F3*0.03%2Bf3%3DC3%2C%20true%2C%20false)%20which%20keeps%20returning%20a%20false%20value%20although%20I%20know%20the%20actual%20calculation%20is%20correct.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20clarify%2C%20the%20value%20of%20F3%20is%2025.48%20and%20the%20value%20of%20C3%20is%2026.55.%20Therefore%2C%20what%20I%20am%20trying%20to%20show%20is%20that%20F3*0.03%2BF3%20%3D%20C3%20(which%20is%20correct).%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20this%20makes%20sense%20and%20would%20really%20appreciate%20any%20advice%20anyone%20could%20provide!%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20%3A)%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-689308%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-689519%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20function%20with%20calculations%20within%20it%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-689519%22%20slang%3D%22en-US%22%3EHi%2C%20The%20formula%20should%20work%20OK.%20Using%20the%20values%20you%20gave%20I%20get%20F3*0.03%2BF3%20to%20%3D%2026.2444%20not%2026.55.%3CBR%20%2F%3E%3CBR%20%2F%3ERich%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-689741%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20function%20with%20calculations%20within%20it%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-689741%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F359415%22%20target%3D%22_blank%22%3E%40jjmi_%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEven%20with%20other%20values%20(e.g.%2025.78%20in%20F3%20or%20like)%20it%20could%20return%20FALSE%20due%20to%20rounding%20%2F%20rounding%20error.%20Better%20to%20ROUND%20values%20before%20compare.%3C%2FP%3E%3C%2FLINGO-BODY%3E
jjmi_
Occasional Visitor

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
Hi, The formula should work OK. Using the values you gave I get F3*0.03+F3 to = 26.2444 not 26.55.

Rich

@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.

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies