Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default adding a month onto todays date

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default adding a month onto todays date

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

--
Regards
Frank Kabel
Frankfurt, Germany


libby wrote:
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default adding a month onto todays date

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.

--
Regards,
Tom Ogilvy


"libby" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default adding a month onto todays date

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

...

Why not condense that to

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



--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default adding a month onto todays date

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

..

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(YE AR(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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default adding a month onto todays date

On Fri, 9 Jul 2004 08:54:11 -0700, "libby"
wrote:

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding/omitting/all the values prior to todays date tleehh Excel Worksheet Functions 2 December 9th 09 08:02 PM
Adding months to date at end of month Shaggyjh Excel Discussion (Misc queries) 4 November 28th 07 12:30 PM
Date arithmetic: adding 1 month to prior end of month date manxman Excel Worksheet Functions 2 July 14th 06 09:29 PM
Adding a month to a date I Maycotte Excel Discussion (Misc queries) 1 July 11th 06 07:15 PM
Adding month and year to form date Dino Excel Discussion (Misc queries) 2 November 18th 05 01:59 AM


All times are GMT +1. The time now is 12:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"