IF Statement
Good afternoon,
I'm trying to write an IF/OR statement utilizing the following:
=IF(OR(Resource Cost Category@row = Professional Fees, 43.75, IF(OR(Resource Cost Category@row = FTE/No Charge, 30)))
Unfortunately, I'm getting a #UNPARSEABLE error message.
Any help would be appreciated!
Jason
Best Answer
-
1st off, a couple general rules you need to follow with writing formulas:
- Any column name that is multiple words (e.g., Resource Cost Category) needs to be in brackets, so [Resource Cost Category]@row for example,
- Any string (text) needs to be in quotes, so where you have Professional Fees this would not to literally be "Professional Fees"
Not following either of the above rules will throw an error.
What are you trying to accomplish? I am guessing you want your destination column (Hrs/week) to show 43.75 and 30.00 when Resource Cost Category is Professional Fees and FTE/NO Charge, respectively. If this is correct the OR() functions are not needed and getting in the way. Just use:
=IF([Resource Cost Category]@row="Professional Fees", 34.75, IF([Resource Cost Category]@row="FTE/NO Charge", 30.00))
I'm writing this off the top of my head and not testing in an actual Sheet so there may be an error due to a typo or what not but it should be close if not correct.
You can continue to stack IF() statements for other categories as needed.
School of Sheets (Smartsheet Partner)
If my answer helped please accept and react w/💡Insightful, ⬆️ Vote Up, ❤️Awesome!
Answers
-
1st off, a couple general rules you need to follow with writing formulas:
- Any column name that is multiple words (e.g., Resource Cost Category) needs to be in brackets, so [Resource Cost Category]@row for example,
- Any string (text) needs to be in quotes, so where you have Professional Fees this would not to literally be "Professional Fees"
Not following either of the above rules will throw an error.
What are you trying to accomplish? I am guessing you want your destination column (Hrs/week) to show 43.75 and 30.00 when Resource Cost Category is Professional Fees and FTE/NO Charge, respectively. If this is correct the OR() functions are not needed and getting in the way. Just use:
=IF([Resource Cost Category]@row="Professional Fees", 34.75, IF([Resource Cost Category]@row="FTE/NO Charge", 30.00))
I'm writing this off the top of my head and not testing in an actual Sheet so there may be an error due to a typo or what not but it should be close if not correct.
You can continue to stack IF() statements for other categories as needed.
School of Sheets (Smartsheet Partner)
If my answer helped please accept and react w/💡Insightful, ⬆️ Vote Up, ❤️Awesome!
-
@Dan Palenchar you absolutely crushed it!! There were definitely a few rookie mistakes in the formula for sure, so thank you very very much. You even managed to understand what I was attempting to do with the rest of the statement, so you managed to kill two of my birds with one response.
Seriously, thank you!
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.3K Get Help
- 392 Global Discussions
- 213 Industry Talk
- 447 Announcements
- 4.6K Ideas & Feature Requests
- 141 Brandfolder
- 132 Just for fun
- 131 Community Job Board
- 453 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 292 Events
- 35 Webinars
- 7.3K Forum Archives