Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Date manipulation question

Hi, everyone.

I am trying to add several months to a date in a field.

Let's say that cell C3 contains the date Aug 1, 2003.

In cell D3 I want to add 18 months to that.

I can seem to add days but not months. The online help (if you can call it
that) isn't much help beyond saying "you can manipulate dates."

Thanks in advance for the help.

Nikko


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Date manipulation question

=DATE(YEAR(C3),MONTH(C3)+18,DAY(C3))

You need to be careful though as adding 18 might end up at the start of a
month after, for instance 31 May gives 1st Dec 2005.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"NikkoW" wrote in message
e.rogers.com...
Hi, everyone.

I am trying to add several months to a date in a field.

Let's say that cell C3 contains the date Aug 1, 2003.

In cell D3 I want to add 18 months to that.

I can seem to add days but not months. The online help (if you can call it
that) isn't much help beyond saying "you can manipulate dates."

Thanks in advance for the help.

Nikko




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Date manipulation question

Hi
as addition to Bob to prevent this problem you may use:
=DATE(YEAR(C3),MONTH(C3)+18,MIN(DAY(C3),DAY(DATE(Y EAR(C3),MONTH(C3)+18+
1,0))))

--
Regards
Frank Kabel
Frankfurt, Germany

"Bob Phillips" schrieb im
Newsbeitrag ...
=DATE(YEAR(C3),MONTH(C3)+18,DAY(C3))

You need to be careful though as adding 18 might end up at the start

of a
month after, for instance 31 May gives 1st Dec 2005.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"NikkoW" wrote in message
e.rogers.com...
Hi, everyone.

I am trying to add several months to a date in a field.

Let's say that cell C3 contains the date Aug 1, 2003.

In cell D3 I want to add 18 months to that.

I can seem to add days but not months. The online help (if you can

call it
that) isn't much help beyond saying "you can manipulate dates."

Thanks in advance for the help.

Nikko





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
Date & Phone Manipulation Ray S. Excel Discussion (Misc queries) 2 June 30th 08 08:37 PM
data manipulation question Blaster Master Excel Worksheet Functions 3 March 22nd 07 08:39 PM
Date Manipulation Greg Excel Discussion (Misc queries) 2 November 7th 06 10:22 PM
Problem with Date Manipulation Sbufkle Excel Discussion (Misc queries) 4 November 24th 05 03:40 PM
csv manipulation question fally Excel Discussion (Misc queries) 1 October 9th 05 12:58 PM


All times are GMT +1. The time now is 10:13 AM.

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"