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.
Jason Tarpinian - Sevan Technology
Smartsheet Aligned Partner
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.
Jason Tarpinian - Sevan Technology
Smartsheet Aligned Partner
-
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
- 65.3K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 302 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!