Thread
:
Subtracting Dates
View Single Post
#
2
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann
external usenet poster
Posts: 2,345
Subtracting Dates
Try:
=DATE(YEAR(A1),MONTH(A1)-1,DAY(A1))
--
HTH
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
Replace @mailinator.com with @tiscali.co.uk
"Terry Bennett" wrote in message
...
I'm sure there must be a simple way of doing this ...
I have a worksheet where the column headers (ie; cells A1:L1) are dates -
the first of each month going back for 12 months. So, A1 is 1 Nov 2007,
B1 is 1 Oct 2007, etc.
What I need is for cells B1:L1 to update automatically when I change the
value of A1 to the first of the current month. So, when A1 becomes 1 Dec
2007, I need B1 to become 1 Nov 2007, etc.
The only way I can think of doing this is by using EOMONTH. Hence, B1 =
EOMONTH(A1,-2)+1. This works OK but to use this function I had to load
one of the add-ins (Analysis Toolpak?) and I notice that when the
spreadsheet is e-mailed to users who have not loaded this, the NAME error
is shown until it is loaded. As the recipients are a large group with
mixed IT abilities, I can forsee problems asking them to do this!
There must be another way?!
Thanks.
Reply With Quote
Sandy Mann
View Public Profile
Find all posts by Sandy Mann