ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to adjust a function to reflect the new year change (https://www.excelbanter.com/excel-worksheet-functions/120956-re-how-adjust-function-reflect-new-year-change.html)

Lisa

How to adjust a function to reflect the new year change
 
We're getting there, but I need it from start date Jan ?, 2007 and the end
date to say Dec ?, 2007, so it will calculate a year later. Now it's giving
Dec 2008.

"Dave F" wrote:

=IF(B37=DATE(2007,01,01),B37,[your formula])

This tests if the date in B37 is Jan 1, 2007. If you need to test for ANY
date between Jan 1 2007 AND Jan 31 2007 inclusive, you should change the test
to something like =IF(MONTH(B37)=1,B37,[your formula])

Dave
--
Brevity is the soul of wit.


"Lisa" wrote:

I have a formula
=DATE(YEAR(B37)+F39,MONTH(B37-1),DAY(B37-1))
This is to calculate yearly contract dates, # of years and start date are
entered.

this works until I enter a date in Jan 2007, it will give me an end date of
12/2008. I neet to do an IF function to tell excel not to change the date if
Jan 07 is used.




All times are GMT +1. The time now is 05:41 AM.

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