Combine IF formulas in one cell
Hello,
I have the following table (below) with a column ''amount of per diem used'' and a column ''number of days abroad''. The total amount of per diem will depend on whether the 40% rate applies, or the 70% rate or the full amount.
So, I would like to use a multiple formula in one cell that says:
if the box 40% per diem is checked, then the calculation is SUM(per diem used * no. of days * 0.4)
if the box 70% per diem is checked, then the calculation is SUM(per diem used * no. of days * 0.7)
if the box Full per diem is checked, then the calculation is SUM(per diem used * no. of days)
My formula is
=IF([40% per diem]@row = 1, SUM([Per diem used]@row * [No of days]@row * 0.4)), IF([70% per diem]@row = 1, SUM([Per diem used]@row * [No of days]@row * 0.7)), IF([Full per diem]@row = 1, SUM([Per diem used]@row * [No of days]@row))
It works if I use only one formula =IF([40% per diem]@row = 1, SUM([Per diem used]@row * [No of days]@row * 0.4)), but when combining the three formulas altogether as above, it doesn't work.
Many thanks for your help!
Nathalie
Answers
-
Try this (assuming there will always be one box checked):
=[Per diem used]@row * [No of days]@row * IF([40% per diem]@row = 1, 0.4, IF([70% per diem]@row = 1, 0.7, 1))
-
Excellent, it works, thanks so much!!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 464 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!