IF function with an additional modifier
Hello,
I have a basic question that I can't seem to find any answer for. Is it possible to use the IF function and have the result modified in the same cell by a value in a different cell?
So here is my formula for the display column:
=IF([Code 1]@row = "Overtime", "$2.00", IF([Code 1]@row = "Doubletime", "$4.00"))
Now, lets say that Jin gets a $1.50 bonus added to his rate no matter what. Is there a way to shove another IF function into this formula like [Name]@row = "Jin", "+$1.50". I would like it to display as "$4.00 + $1.50" instead of "$5.50" if possible.
Best Answer
-
I would add in another row for the bonus. From there you can use the formula below. You might need to add an apostrophe in front of the bonus number if you intend to have zeroes at the end. For example input '$1.50 instead of $1.50 so Smartsheet doesn't convert the amount to a value.
=IF([Code 1]@row = "Overtime", "$2.00", IF([Code 1]@row = "Doubletime", "$4.00")) + IF(Bonus@row = "", "", " + " + Bonus@row)
If you intend to use names things can get more complex because they are variable but to answer your question you can insert the name into the formula as an option
=IF([Code 1]@row = "Overtime", "$2.00", IF([Code 1]@row = "Doubletime", "$4.00")) + IF(Name@row = "Jin", " + $1.50", "")
Answers
-
I would add in another row for the bonus. From there you can use the formula below. You might need to add an apostrophe in front of the bonus number if you intend to have zeroes at the end. For example input '$1.50 instead of $1.50 so Smartsheet doesn't convert the amount to a value.
=IF([Code 1]@row = "Overtime", "$2.00", IF([Code 1]@row = "Doubletime", "$4.00")) + IF(Bonus@row = "", "", " + " + Bonus@row)
If you intend to use names things can get more complex because they are variable but to answer your question you can insert the name into the formula as an option
=IF([Code 1]@row = "Overtime", "$2.00", IF([Code 1]@row = "Doubletime", "$4.00")) + IF(Name@row = "Jin", " + $1.50", "")
-
So I took your advice and just created an additional column. I'm going to circle back and try this later, but I think it looks good.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.7K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 468 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 64 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!