# Solved Using the round function with an if statement

October 10, 2012 at 11:32:58
Specs: Windows 7
 I'm writing an IF statement to check my math, such that, IF A + B = C, return CHECK, else return ERROR. I'm getting ERROR in cases where the result of A + B differs from C in the 4th or 5th decimal place. If they are equal in the 2nd decimal place I want the IF statement to return CHECK. I've tried putting the ROUND function in several locations within the IF statement, but I'm not getting it right. How can I accomplish this? Any help would be appreciated. The IF function I'm writing is: =IF(F151+F149=F145,"CHECK","ERROR")

See More: Using the round function with an if statement

#1
October 10, 2012 at 12:02:32
 Try this:=IF(ROUND(F151+F149,2)=ROUND(F145,2),"CHECK","ERROR")Please note this will only work if the digits that are different are located in greater than the 4th decimal place. Let me know if that works or if you need more help! :)-----IT Desktop & Network Consultant - MOS Master Certified, MCP, MCSA, MCITP - Windows 7, CCNA Certificate Pending, A+, Network +::geek::

Report •

#2
October 10, 2012 at 12:02:57
 What type of data are you entering in F151 & F149? MIKEhttp://www.skeptic.com/

Report •

#3
October 10, 2012 at 13:00:34
 Thanks SongCloud - that did the trick. I appreciate you lending your expertise.

Report •

Related Solutions

#4
October 10, 2012 at 15:06:51
 No problem. Glad I could help! :)-----IT Desktop & Network Consultant - MOS Master Certified, MCP, MCSA, MCITP - Windows 7, CCNA Certificate Pending, A+, Network +::geek::

Report •