View Single Post
 
Old 04-23-2024, 01:15 PM
wsnow wsnow is offline Windows 10 Office 2019
Novice
 
Join Date: Sep 2023
Posts: 24
wsnow is on a distinguished road
Default Calculate due date with variable based on different start dates.

Hi,
I need a formula that will do the following:
If the Declaration Date (column B) is on or before 3/22/2023, read the value in column I (POP End Date), subtract 60 days and return that value to column J (POP Ext Req Deadline). If the Declaration Date (column B) is after 3/22/2023, read the value in column I (POP End Date), subtract 90 days and return that value to column J (POP Ext Req Deadline).

I created these two separate formulas:
=IF(([@[Declaration Date]])<=3/22/2023), DATE(YEAR([@[POP End Date]]), MONTH([@[POP End Date]]), DAY([@[POP End Date]])-60)))

=IF(([@[Declaration Date]])>3/22/2023), DATE(YEAR([@[POP End Date]]), MONTH([@[POP End Date]]), DAY([@[POP End Date]])-90)))

I think they are close, as independent formulas, but Excel seems to be having problem reading the 2023 in the Declaration Date field. When I close the error message, the 2023 is highlighted in the formula bar, but I don’t know how to fix it. The column formatting is for Date, with structure used above. And, of course, those two sets of instructions need to be combined, with some kind of “ELSE” (or whatever language is relevant) instructions, but that’s where I get lost.

Thanks
Reply With Quote