Thread: Date Formula
View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Karen Karen is offline
external usenet poster
 
Posts: 447
Default Date Formula

Thank you David - You gave me a few good ideas.
Karen

"David Biddulph" wrote:

=DATE(YEAR(A1),MONTH(A1)+3,DAY(A1)) is one option for a simple 3-month
adavance, but you'll need to ask yourself the question as to what date you
want for 3 months after 30th November, for example. By the look of your
examples, you want a different answer from Excel's, and you'll see a number
of suggestions for alternative approaches in recent messages on this group
and related ones.

=IF(MONTH(DATE(YEAR(A4),MONTH(A4)+3,DAY(A4)))MONT H(A4)+3,DATE(YEAR(A4),MONTH(A4)+4,0),DATE(YEAR(A4) ,MONTH(A4)+3,DAY(A4)))
may be an option, but there are certain to be other approaches.

You haven't said how you would treat a situation where your starting point
doesn't fit in your maintenance schedule, for example if A1 were
mid-February, but perhaps you've got Data Validation on your data entry to
prevent this?
--
David Biddulph

"Karen" wrote in message
...
How would a formula be written to add a defined number of months but not
by
days, like "[date in cell]A1+3 (months)" instead of "[date in cell]A1+90
(days, which is the default way Excel deals with dates)"?

I have a spreadsheet that has quarterly maintenance that can be performed
anytime in January, April, July, and October, but it must be performed in
those months specifically. If I set up the formula as "=[date in
cell]A1+90"
for the next quarterly maintenance due, the month will change depending on
how many days in the months of the quarter and when in the month
maintenance
was performed.

Cell A1 date entered = 1/1/07
Cell A2 formula is "=A1+90," Cell A2 value is "Apr-07" . which is
correct,
according to the desired schedule. However.

Cell A2 date entered = 1/31/07
Cell A2 formula is "=A1+90," Cell A2 value is "May-07" . which is
incorrect;
maintenance should be performed consistently in April.

Also,
Cell A2 date entered = 4/1/07, Cell A2 formula is "=A1+90," Cell A2 value
is
"Jun-07" . which is incorrect; maintenance should be performed
consistently
in July.

I hope that I am explaining myself correctly - ANY help would be greatly
appreciated, Karen