Nested if formula

SuzyQPA2

Board Regular
Joined
Oct 28, 2004
Messages
90
I have a formula and it works but i'd like to tweak it and can't seem to get it.

Here's the formula.
IF(YEAR(C4)=2017,IF(MONTH(C4)=1,F4*1.5%,IF(MONTH(C4)=2,F4*1.25%,IF(MONTH(C4)=3,F4*1%,IF(MONTH(C4)=4,F4*0.75%,IF(MONTH(C4)=5,F4*0.5%,IF(MONTH(C4)=6,F4*0.25%,0)))))))

Basically the formula says if the year is 2017 and the month is January - June, return the corresponding % increase.
Gripes:

I'd also like it to check another cell (j4)and see if the text says "per-diem" if yes then i want it to return zero, if no then continue with the formula.

If you can shorten the formula be my guest ;)
 
Hi, to both of you!

With the new changes, you can use:

=F4*IF((J4<>"per diem")*(YEAR(C4)=2017),(MONTH(C4)<6)*(1.75%-MONTH(C4)*0.25%))

Blessings!
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,216,228
Messages
6,129,617
Members
449,520
Latest member
TBFrieds

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top