Nested Ifs not working

Hey,
I'm trying to create some nested ifs for grid logic.
This works perfectly for one if statement
=IF(LOE@row = "Large", "12", βEmptyβ)
But once I start to nest, it does not, and I've tried multiple combinations of parens and read the articles, etc, but it keeps saying #UNPARESEABLE"
=IF(LOE@row = "Large", "12", IF(LOE@row = βSmallβ, "4β, "Emptyβ))
Where I am trying to go is something like this, but I need above to work first!
=IF(LOE@row = "Extra Large", "20", IF(LOE@row = βLargeβ, "12", IF(LOE@row = βMediumβ, "8", IF(LOE@row = βSmallβ, "4", IF(LOE@row = βExtra Smallβ, "1β, "Emptyβ)))))
(I also tried IF([LOE]@row based on other articles, but Smartsheet just deletes the [] brackets)
What am I doing wrong?
Best Answer
-
Hi Rebecca,
When you're entering numeric values as results in formulas, you don't need to add it in quotes. It is only needed for strings. Here's the formula you can use.
=IF(LOE@row = "Extra Large", 20, IF(LOE@row = "Large", 12, IF(LOE@row = "Medium", 8, IF(LOE@row = "Small", 4, IF(LOE@row = "Extra Small", 1, "Empty")))))
Thanks,
Aravind GP| Delivery Manager
Atturra Data & Integration
M: +61493337445
E:Aravind.GP@atturra.com
W: www.atturra.com
Answers
-
Hi Rebecca,
When you're entering numeric values as results in formulas, you don't need to add it in quotes. It is only needed for strings. Here's the formula you can use.
=IF(LOE@row = "Extra Large", 20, IF(LOE@row = "Large", 12, IF(LOE@row = "Medium", 8, IF(LOE@row = "Small", 4, IF(LOE@row = "Extra Small", 1, "Empty")))))
Thanks,
Aravind GP| Delivery Manager
Atturra Data & Integration
M: +61493337445
E:Aravind.GP@atturra.com
W: www.atturra.com
-
Thank you so much!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.9K Get Help
- 474 Global Discussions
- 208 Use Cases
- 517 Announcements
- 5.6K Ideas & Feature Requests
- 87 Brandfolder
- 157 Just for fun
- 84 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!