Can't get 2 IF formulas to work
These formulas both work in separate Columns, however when I try to use them together in one row/column I get "Incorrect Argument". I would like to get rid of the Balanced? Column and just have the Over/Under. So if columns One+Two+Three+Four are Equal to Grand Total, I would like the Over/Under Column to say Balanced.
These each work separately:
=IF([Grand Total]@row > [One]@row + [Two]@row + [Three]@row + [Four]@row, "UNDER", "OVER")
=IF([Grand Total]@row = [One]@row + [Two]@row + [Three]@row + [Four]@row, "BALANCED")
This is what is giving me the Incorrect Argument or Unparseable:
=IF([Grand Total]@row > [One]@row + [Two]@row + [Three]@row + [Four]@row, "UNDER", "OVER"), IF([Grand Total]@row = [One]@row + [Two]@row + [Three]@row + [Four]@row, "BALANCED"))
Best Answer
-
Hi @AnnaR
Try this:
=IF([Grand Total]@row = SUM(One@row:Four@row), "BALANCED", IF([Grand Total]@row > SUM(One@row:Four@row), "UNDER", "OVER"))
Keep in mind that IF statements are always true or false. In your original formula, you told it to return "UNDER" if the Grand Total was greater than the sum of One, Two, Three, and Four. Since you put ,"OVER" right after that, you were telling it that if the Grand Total was NOT greater than the sum of One, Two, Three, and Four, it should return "OVER". Since you have three different conditions, you should keep chaining them until there are no conditions left. Because you closed out your first IF statement with both a true and false value, it didn't know what to do with your second IF statement.
Answers
-
Hi @AnnaR
Try this:
=IF([Grand Total]@row = SUM(One@row:Four@row), "BALANCED", IF([Grand Total]@row > SUM(One@row:Four@row), "UNDER", "OVER"))
Keep in mind that IF statements are always true or false. In your original formula, you told it to return "UNDER" if the Grand Total was greater than the sum of One, Two, Three, and Four. Since you put ,"OVER" right after that, you were telling it that if the Grand Total was NOT greater than the sum of One, Two, Three, and Four, it should return "OVER". Since you have three different conditions, you should keep chaining them until there are no conditions left. Because you closed out your first IF statement with both a true and false value, it didn't know what to do with your second IF statement.
-
Thank you Julie! I knew it had to be something in how I was entering the conditions, but could not see it.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.4K Get Help
- 394 Global Discussions
- 213 Industry Talk
- 449 Announcements
- 4.6K Ideas & Feature Requests
- 141 Brandfolder
- 132 Just for fun
- 131 Community Job Board
- 453 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 293 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!