Need formula dates
Correction... I used the wrong range in my first formula; here is the
corrected formula (still array-entered**)...
=DATE(YEAR(A1)-SUM(CHOOSE(1+MOD(B1:D1-3,5),2,5,15)),MONTH(A1),DAY(A1))
** Commit formula using Ctr+Shift+Enter, not just Enter by itself.
--
Rick (MVP - Excel)
"Rick Rothstein" wrote in message
...
Your example is a little confusing to me. Are you saying you have those
dates in Excel's Column A and the what you labeled as ColA, ColB and ColC
are really in Excel's Column B, C and D? If so, then I think this
array-entered** formula does what you want...
=DATE(YEAR(A1)-SUM(CHOOSE(1+MOD(B1:B3-3,5),2,5,15)),MONTH(A1),DAY(A1))
** Commit formula using Ctr+Shift+Enter, not just Enter by itself.
--
Rick (MVP - Excel)
"Sheldon" wrote in message
...
Hello
I have the following scenario:
Date ColA ColB ColC NewDate
1/3/2001 3 4 10 FORMULA CELL
2/15/2008 4 4 4 FORMULA CELL
If a number is 3 then it's equivalent to two years. If it's 4, it means
5
years and if it's 10, it is 15 years.
I need to then take the Date column and subtract ColA, ColB and ColC to
give
a date in the NewDate field.
--
Sheldon
|