Combining 2 IF statements
I have 2 valid IF statements but I would like to combine them so the value from either statement is returned in one cell. Below are the 2 statements
=IF([New Priority]@row >= 14, "Level 1", IF([New Priority]@row <= 9, "Level 3")
=IF(AND([New Priority]@row >= 10, [New Priority]@row <= 13), "Level 2")
Best Answer
-
Hi, @J Hogan, if you include all parts (full syntax) of the IF() expression in your first formula and layout the formula like below...
= IF([New Priority]@row >= 14 , "Level 1" , IF([New Priority]@row <= 9 , "Level 3" , "xxxx" ) )
...then you can substitute your second formula/expression for the "xxxx" resulting in...
= IF([New Priority]@row >= 14, "Level 1", IF([New Priority]@row <= 9, "Level 3", IF(AND([New Priority]@row >= 10, [New Priority]@row <= 13), "Level 2")))
However, you needn't do this since... If "New Priority" is not ≥ 14 AND it is not ≤ 9, that is to say, "New Priority" is between 9 and 14, then it's a "Level 2". For this, simply replace "xxxx" with "Level 2".
= IF([New Priority]@row >= 14 , "Level 1" , IF([New Priority]@row <= 9 , "Level 3" , "Level 2" ) )
Collapsed, your shortened formula would be,
= IF([New Priority]@row >= 14, "Level 1", IF([New Priority]@row <= 9, "Level 3", "Level 2"))
Answers
-
Hi, @J Hogan, if you include all parts (full syntax) of the IF() expression in your first formula and layout the formula like below...
= IF([New Priority]@row >= 14 , "Level 1" , IF([New Priority]@row <= 9 , "Level 3" , "xxxx" ) )
...then you can substitute your second formula/expression for the "xxxx" resulting in...
= IF([New Priority]@row >= 14, "Level 1", IF([New Priority]@row <= 9, "Level 3", IF(AND([New Priority]@row >= 10, [New Priority]@row <= 13), "Level 2")))
However, you needn't do this since... If "New Priority" is not ≥ 14 AND it is not ≤ 9, that is to say, "New Priority" is between 9 and 14, then it's a "Level 2". For this, simply replace "xxxx" with "Level 2".
= IF([New Priority]@row >= 14 , "Level 1" , IF([New Priority]@row <= 9 , "Level 3" , "Level 2" ) )
Collapsed, your shortened formula would be,
= IF([New Priority]@row >= 14, "Level 1", IF([New Priority]@row <= 9, "Level 3", "Level 2"))
-
Thank you!! This worked.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!