Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Calculate date for one month previous?

Cell A1 has 2/1/09 in it. Is there a way cell A2 can calculate the date of
the previous month, 1/1/09?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Calculate date for one month previous?

=DATE(YEAR(A1),MONTH(A1)-1,DAY(A1))

Just be caareful about going back to a short month.
--
Gary''s Student - gsnu200852


"liirogue" wrote:

Cell A1 has 2/1/09 in it. Is there a way cell A2 can calculate the date of
the previous month, 1/1/09?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,231
Default Calculate date for one month previous?

liirogue wrote...
Cell A1 has 2/1/09 in it. *Is there a way cell A2 can calculate the date of
the previous month, 1/1/09?


Referring to your starting date as SD, the usual way is

=DATE(YEAR(SD),MONTH(SD)-1,DAY(SD))

as long as you're willing to live with how Excel handles 1 month
previous to, e.g., 3/30/2009 or 5/31/2009. If you want the last day of
a month with more days than the preceding month mapping to the last
day of the preceding month, you could try

=MIN(DATE(YEAR(SD),MONTH(SD)-1,DAY(SD)),SD-DAY(SD))

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default Calculate date for one month previous?

=MIN(DATE(YEAR(A2),MONTH(A2)-{1,0},DAY(A2)*{1,0}))

--
__________________________________
HTH

Bob

"liirogue" wrote in message
...
Cell A1 has 2/1/09 in it. Is there a way cell A2 can calculate the date
of
the previous month, 1/1/09?



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
Previous month date format constant Marilyn Excel Discussion (Misc queries) 1 August 13th 08 01:43 AM
THe Last DATE of the previous month from today CmK Excel Worksheet Functions 6 May 4th 07 03:20 PM
THe Last DATE of the previous month from today Mike Excel Worksheet Functions 0 February 28th 07 01:59 PM
Date of the First day of the previous month Hari Excel Discussion (Misc queries) 3 May 20th 06 06:49 PM
date of last friday of previous month tkaplan Excel Discussion (Misc queries) 7 November 14th 05 06:05 PM


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