how to create a dynamic descending list of months & years

M

marika1981

I'm trying to create a spreadsheet whereby in cell A1 I enter in any given
Month and Year ("January 2005", formatted as a date), and in cells B1:J1 the
previous months and years show up (December 2004; November 2004; October
2004; etc....) If I type in "April 1985", the adjacent cells would read
"March 1985; February 1985; January 1985; December 1984; etc...

I've thought of a couple laboriuos, crude, potentially faulty ways of doing
this, but it seems like there should be an eloquent solution.

Very much appreciated!!!
Marika :)
 
N

Nick B

Can you put the following formula in B1:
=date(year(A1),2,1)
the following in C1:
=date(year(A1),3,1)
etc. this will create a date with the year that is in A1 and the second
parameter specifies the number of the month...
 
J

Jason Morin

Enter the 1st day of the month in A1 in the format
m/d/yy, then customer format as mmmm yyy.

In B1 insert this:

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

and fill across. Format the cells as mmmm yyy.

HTH
Jason
Atlanta, GA
 
M

Max

One way

With A1 containing, say: January 2005

Put in B1:

=DATE(YEAR($A1),MONTH($A1)-COLUMNS($A$1:A1),1)

Format as per date in A1

Copy B1 across as many cols as needed

The above will return what is wanted
 
N

Nick B

Sorry, didn't read it close enough.

Nick B said:
Can you put the following formula in B1:
=date(year(A1),2,1)
the following in C1:
=date(year(A1),3,1)
etc. this will create a date with the year that is in A1 and the second
parameter specifies the number of the month...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top