Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Previous month date format constant | Excel Discussion (Misc queries) | |||
THe Last DATE of the previous month from today | Excel Worksheet Functions | |||
THe Last DATE of the previous month from today | Excel Worksheet Functions | |||
Date of the First day of the previous month | Excel Discussion (Misc queries) | |||
date of last friday of previous month | Excel Discussion (Misc queries) |