adding a month onto todays date

L

libby

A while ago someone posted asking how to add a month onto
todays post.
However it wasn't done in code, but by a formula in a cell.

Does anyone know how to do this?
ie a formula which will display todays date + 1 month.

Thankies
 
F

Frank Kabel

Hi
try
=DATE(YEAR(A1),MONTH(A1)+1,MIN(DAY(A1),DAY(DATE(YEAR(A1),MONTH(A1)+2,0)
)))
 
T

Tom Ogilvy

In general it would be:

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

however, if today was Aug 31, 2004, then it would display "October 1, 2004"
since September doesn't have 31 days.

you would have to add some additional testing if this is a consideration.
 
H

hgrove

Frank Kabel wrote...
try
=DATE(YEAR(A1),MONTH(A1)+1,MIN(DAY(A1),DAY(DATE(YEAR(A1),
MONTH(A1)+2,0))))
...

Why not condense that to

=A1+31-DAY(A1+31)+(MONTH(A1+31)-MONTH(A1)<>2)*DAY(A1)
 
F

Frank Kabel

Frank Kabel wrote...
..

Why not condense that to

=A1+31-DAY(A1+31)+(MONTH(A1+31)-MONTH(A1)<>2)*DAY(A1)

Just a simple reason: I use this kind of formula also adding n months
in the generic form of:
=DATE(YEAR(A1),MONTH(A1)+n,MIN(DAY(A1),DAY(DATE(YEAR(A1),MONTH(A1)+n+1,
0))))

Of course one can adapt your formula also for more than 1 month but as
I'm lazy I just stick to the above solution :)
But agreed your solution is shorter for adding 1 month
 
L

Lars-Åke Aspelin

A while ago someone posted asking how to add a month onto
todays post.
However it wasn't done in code, but by a formula in a cell.

Does anyone know how to do this?
ie a formula which will display todays date + 1 month.

Thankies

Try this
=EDATE(TODAY();1)
larske
 
Top