Nested IF statements
Can anyone assist me in where I am going wrong?
=IF([GEAR.]@row = true, [C/N SQD]@row, IF(LTG@row = true, [C/N LIGHTING]@row), IF(AND([GEAR.]@row = true, LTG@row = true) = true, [PROJECT TOTAL]@row))
If checkbox1 = true, set value to cell 1, if checkbox2 = true, set value to cell2, if BOTH checkboxes = true, set value to cell 3 (I would like to sum two cells together, but I just made another column that does the summing for me ahead of time.
Best Answer
-
You will have to check your IF(AND( statement first. The way you have it currently, if both boxes are checked, the logic would stop at the first statement because box 1 is checked, and not even check the logic on box 2. So you almost have it, just shift the IF(AND( combo as the first step in the logic:
=IF(AND([GEAR.]@row = true, LTG@row = true), [PROJECT TOTAL]@row, IF([GEAR.]@row = true, [C/N SQD]@row, IF(LTG@row = true, [C/N LIGHTING]@row, "No Match")))
Where "No Match" would be the result if nothing is checked.
Answers
-
You will have to check your IF(AND( statement first. The way you have it currently, if both boxes are checked, the logic would stop at the first statement because box 1 is checked, and not even check the logic on box 2. So you almost have it, just shift the IF(AND( combo as the first step in the logic:
=IF(AND([GEAR.]@row = true, LTG@row = true), [PROJECT TOTAL]@row, IF([GEAR.]@row = true, [C/N SQD]@row, IF(LTG@row = true, [C/N LIGHTING]@row, "No Match")))
Where "No Match" would be the result if nothing is checked.
-
That makes sense. I didn't think about it logically enough. That did the trick though!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 68K Get Help
- 474 Global Discussions
- 208 Use Cases
- 517 Announcements
- 5.6K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 85 Community Job Board
- 521 Show & Tell
- 36 Member Spotlight
- 3 SmartStories
- 309 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!