Confounding Behavior with IF Statement

Hello all,
I've run into an issue around what should be an entry level IF statement. I'm comparing numbers in two columns, one of which is derived from a time calculation. The formula is looking to determine if the two values are greater than or equal to one another and outputs a simple "Yes" or "No" depending on the values. I have an instance where the two values are equal but the formula is yielding "No."
I've reached out to customer support who suggested I clear the values, save the sheet, add them again and check. I received the same answer via the formula.
Thank you in advance.
Best Answer
-
This formula works.
=IF(AND([In - Min Hours]@row <= [In - Total Hours Worked]@row, [In - Min Hours]@row <> ""), "Yes", IF([In - Total Hours Worked]@row = "", "", "No"))
If you copy and it's not working, then try entering numbers in the In - Min Hours and In - Total Hours Worked. It's possible there is some fraction of a second beyond what is showing causing the issue so you may want to round it in the formula.
Answers
-
This formula works.
=IF(AND([In - Min Hours]@row <= [In - Total Hours Worked]@row, [In - Min Hours]@row <> ""), "Yes", IF([In - Total Hours Worked]@row = "", "", "No"))
If you copy and it's not working, then try entering numbers in the In - Min Hours and In - Total Hours Worked. It's possible there is some fraction of a second beyond what is showing causing the issue so you may want to round it in the formula.
-
You were correct regarding there being a rounding issue. Although both appear to be the same, placing ROUND in the IN - Total Hours Worked did the trick. Thank you for the suggestion.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.2K Get Help
- 430 Global Discussions
- 150 Industry Talk
- 490 Announcements
- 5.2K Ideas & Feature Requests
- 85 Brandfolder
- 154 Just for fun
- 74 Community Job Board
- 500 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!