ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date / formula problem (https://www.excelbanter.com/excel-discussion-misc-queries/173631-date-formula-problem.html)

SGT Buckeye

Date / formula problem
 
Please help. Can this be done? On WS 1, there is lookup criteria in
cell A2, a date in cell D2 and another date in cell I2. On WS 2,
there is a table with the lookup criteria in cells A2 thru A9. I
would like a formula to add the number of months from a cell in the
table on WS2 (vlookup) to the date in cells D2 and I2, compare the
two, and then return the date that is later.

Pete_UK

Date / formula problem
 
Short on detail, but I think it is going to be something like:

=MAX(DATE(YEAR(D2),MONTH(D2)+your_lookup,DAY(D2)), I2)

where your_lookup will be of the form:

VLOOKUP(A2,Sheet2!A2:B9,2,0)

This assumes the formula is in WS 1 - if not, then you'll need to
include the sheet reference with D2 and I2.

Hope this helps.

Pete

On Jan 18, 8:08*pm, SGT Buckeye wrote:
Please help. *Can this be done? *On WS 1, there is lookup criteria in
cell A2, a date in cell D2 and another date in cell I2. *On WS 2,
there is a table with the lookup criteria in cells A2 thru A9. *I
would like a formula to add the number of months from a cell in the
table on WS2 (vlookup) to the date in cells D2 and I2, compare the
two, and then return the date that is later.




All times are GMT +1. The time now is 03:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com