dynamic dates

B

BorisS

I'd like to figure out a clever way to build a dynamic date heading row. I
need to enter the first month (1st of the month) and have the following
columns all be the 1st of the subsequent month. I know I can just add 31,
but that does't get me precisely to the 1st each time. I know I can do
date() using the previous column's data and adding 1 to month, but then I
have to IF for the case that I am hopping from December to Jan. Any other
way that is a function I don't know about?
 
M

Myrna Larson

Put the first date in, say, A1. In B1 use this formula =EOMONTH(A1,0)+1 and
copy to the right. EOMONTH is part of the Analysis Tool Pack.

Your last point re going from Dec to Jan isn't really a problem. This formula
will still work, with the first date in A1, =DATE(YEAR(A1),MONTH(A1)+1,1).
That's because the 13th month of 2005 is January, 2006.
 
Top