#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default dates

I have a cell in a spreadsheet with Today() in it which
returns the current system date. Is there a way of adding
a month on to this. I know about the DateAdd function in
VBA, but would rather use a cell formula if possible.

TIA
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default dates

LiSa

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

Gord Dibben Excel MVP


On Sat, 12 Jun 2004 11:51:40 -0700, "LiSa"
wrote:

I have a cell in a spreadsheet with Today() in it which
returns the current system date. Is there a way of adding
a month on to this. I know about the DateAdd function in
VBA, but would rather use a cell formula if possible.

TIA


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default dates

It all depends on how you define a "month". For example, the formula
suggested will yield 1-Oct-2004 if you add a month to 31-Aug-2004. The
formula is correct; it gives inconsistent results solely due to the
peculiarities of our calendar in which months can have anywhere from 28 to
31 days.

--

Vasant





"LiSa" wrote in message
...
I have a cell in a spreadsheet with Today() in it which
returns the current system date. Is there a way of adding
a month on to this. I know about the DateAdd function in
VBA, but would rather use a cell formula if possible.

TIA





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default dates

Thanks that works great, but I still have to reference the
cell D1 with =Today() in it.
Is there any way I can have it all in one cell?
-----Original Message-----
one way
=DATE(YEAR(D1),MONTH(D1)+1,DAY(D1))

--
Don Guillett
SalesAid Software

"LiSa" wrote in

message
...
I have a cell in a spreadsheet with Today() in it which
returns the current system date. Is there a way of

adding
a month on to this. I know about the DateAdd function in
VBA, but would rather use a cell formula if possible.

TIA



.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default dates

Hi Lisa!

If the Day of Month is likely to be equal to or greater than 29, you
need to make sure what you want.

Take:
A1: 31-Jan-2004

=DATE(YEAR(A1),MONTH(A1)+1,DAY(A1))
Returns: 2-Mar-2004

And:
A1: 31-Jan-2005

=DATE(YEAR(A1),MONTH(A1)+1,DAY(A1))
Returns: 1-Mar-2005

If you prefer the last day of the month in cases where the day does
not exist, use the formula:

=DATE(YEAR(A1),MONTH(A1)+1,MIN(DAY($A$1),DAY(DATE( YEAR(A1),MONTH(A1)+2,0))))

This is based upon a general formula that can be copied down or across
of:

=DATE(YEAR(A1),MONTH(A1)+AddMons,MIN(DAY($A$1),DAY (DATE(YEAR(A1),MONTH(A1)+AddMons+1,0))))

Where AddMons is the number of months to be added.

And here’s an alternative that does the same by Peter Dorigo:

=MIN(DATE(YEAR(A1),MONTH(A1)+ AddMons +{1,0},DAY($A$1)*{0,1}))

For one off situations not involving copying down or accross, if you
can rely upon Analysis ToolPak being installed and selected, you can
use:

=EDATE(A1,1)


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia

"LiSa" wrote in message
...
I have a cell in a spreadsheet with Today() in it which
returns the current system date. Is there a way of adding
a month on to this. I know about the DateAdd function in
VBA, but would rather use a cell formula if possible.

TIA



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
Linking computer dates (time) to spreadsheet dates that have formu bigisle Excel Worksheet Functions 3 January 3rd 10 08:05 PM
Stop dates from showing as numbers - when formated as dates JR Excel Discussion (Misc queries) 1 October 29th 08 04:38 PM
compare 2 tables of dates to find the preceding dates Babi Excel Worksheet Functions 3 October 28th 08 05:52 AM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM


All times are GMT +1. The time now is 09:21 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"