singleton2787
asked on
YEARFRAC question
With this formula...is it possible to show when a date has been moved either forward or backwards with some method? Color-coding??
=YEARFRAC(I683,K683,1)*12
=YEARFRAC(I683,K683,1)*12
ASKER
To determine whether the date being compared is ahead or behind the original date...it does calc correcly, but I can't tell at glance if the compared date is ahead or behind the orginal date.
A B C D E
12/01/2011 08/01/2011 03/01/2011 8 5(this is before col B by 5 months)
A B C D E
12/01/2011 08/01/2011 03/01/2011 8 5(this is before col B by 5 months)
You can do a simple comparison of the two dates:
=IF(C1<B1,"Before","After" )
Kevin
=IF(C1<B1,"Before","After"
Kevin
You can use the above formula in a conditional formatting rule to set the color of the cell.
Kevin
Kevin
See attached example.
Q-26891394.xlsx
Q-26891394.xlsx
If you want you could make the results positive or negative, e.g. by using
=YEARFRAC(I683,K683,1)*12* SIGN(K683- I683)
regards, barry
=YEARFRAC(I683,K683,1)*12*
regards, barry
ASKER
Barry, works great...except the negative and positive are reversed. No big deal, but is the fix easy?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Barry