ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need a function or formulae that will return the current date + 1 (https://www.excelbanter.com/excel-worksheet-functions/101802-need-function-formulae-will-return-current-date-1-a.html)

scott56hannah

Need a function or formulae that will return the current date + 1
 
Would also be helpful if there were similar formulae that would provide the
ability to either add 1 day or add 1 year to the current date......Of course
it needs to take into account leap years and other problems.....can anyone
help

Excelenator

Need a function or formulae that will return the current date + 1
 

To return the Current Date + 1 Day use

=Today() + 1

To return the Current Date + 1 Year

=DATE(YEAR(TODAY()) +1,MONTH(TODAY()),DAY(TODAY()))

You mention that it has to account for leap years. What do you mean by
that? If you replace the +1 with +3 in the formula above to add three
years to today (and thus cross over 2008 which is the next leap year)
the date returned is 7/27/09. Is this not the answer you are looking
for?


scott56hannah Wrote:
Would also be helpful if there were similar formulae that would provide
the
ability to either add 1 day or add 1 year to the current date......Of
course
it needs to take into account leap years and other problems.....can
anyone
help



--
Excelenator


------------------------------------------------------------------------
Excelenator's Profile: http://www.excelforum.com/member.php...o&userid=36768
View this thread: http://www.excelforum.com/showthread...hreadid=565827


Elkar

Need a function or formulae that will return the current date + 1
 
The formula:

=TODAY()+1

will add 1 day to today's date.

You could also use:

=DATE(YEAR(TODAY())+3,MONTH(TODAY())+4,DAY(TODAY() )+2)

This will add 3 years, 4 months and 2 days to today's date.

HTH,
Elkar



"scott56hannah" wrote:

Would also be helpful if there were similar formulae that would provide the
ability to either add 1 day or add 1 year to the current date......Of course
it needs to take into account leap years and other problems.....can anyone
help


Flintstone

Need a function or formulae that will return the current date + 1
 

Scott56hannah:

Leap Years should not be a problem that I can see, and you should
specify in more detail when you say, “other problems”. However, this
formula will determine if it is a leap year or not.

=IF(MOD(YEAR(A1),4)=0,"YES","NO")

Since Feb. 29th can’t exist in Feb. unless it is a Leap Year, Excel
will automatically accommodate by your adding 1 day to make it either
the 29th or the 01st of Mar. Use this formula.

=DATE(YEAR(A1)+1,MONTH(A1),DAY(A1)+1)

Matt


--
Flintstone
------------------------------------------------------------------------
Flintstone's Profile: http://www.excelforum.com/member.php...o&userid=15310
View this thread: http://www.excelforum.com/showthread...hreadid=565827



All times are GMT +1. The time now is 02:47 PM.

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