IF statement comparing month and year separately
Thanks for the suggestion. It works perfectly when I use it by itself but
when I try to incorporate it into my existing formula (see below) I get a
value of TRUE instead of the calculation I need.
What I'm trying to do here is set up five year budget by month (months
across row 1) where the value of each cell is based on the previous month's
value. (Starting monthly salary is in cell E4.) The values need to increase
by 2.5% on the anniversary date in years 1 and two, by 3% in years three
through five, and by 1% every anniversary thereafter. So:
=IF(G$1=DATE(YEAR($C4),MONTH($C4)+60,DAY($C4)),(E4 *1.03),
IF(G$1=DATE(YEAR($C4),MONTH($C4)+48,DAY($C4)), (E4*1.03),
IF(G$1=DATE(YEAR($C4),MONTH($C4)+36,DAY($C4)), (E4*1.03),
IF(G$1=DATE(YEAR($C4),MONTH($C4)+24,DAY($C4)), (E4*1.025),
IF(G$1=DATE(YEAR($C4),MONTH($C4)+12,DAY($C4)), (E4*1.025),E4)))))
When I nest your formula in either at the beginning or end I end up TRUE
values in my cells. Any advice on how to correctly incorporate it into my
existing formula? (I'm also open to starting from scratch if you have
anything better up your sleeve.)
Thanks again.
spence
"Elkar" wrote:
Try this:
=IF(AND(G1=DATE(YEAR(C4),MONTH(C4)+60,DAY(C4)),MO NTH(G1)=MONTH(C4)),TRUE,FALSE)
HTH,
Elkar
"spence" wrote:
I have two cells that contain dates, C4 and G1. I need help writing an IF
statement that says
IF the date in G1 is = C4+60 months AND if the month in C4 and G1 are the
same, then multiple by 1%. Otherwise do nothing.
If possible I need this in a single IF function because it will be nested in
a larger statement and Im running into Excels limit of seven.
Can anyone help me out with the syntax here?
Thanks in advance.
spence
|