Populating columns based on Month/Year

sykinc

New Member
Joined
Nov 11, 2005
Messages
17
Hi All - Is it possible to enter a month and year on one sheet, say, April 2014, and then on another sheet, only 4 columns are populated (Jan, Feb, March, April) with a 5th column saying 2014? Basically, I don't want 8 blank columns before 2014 shows up, just the 4 months + 1 column for year, based on input. But, the trick is it needs to be flexible if a different month is input. Thanks for any help!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
With Sheet1 enter your date, say Apr 2014, in Cell A1 and custom format "mmm yyyy".

On Sheet2 enter the formula =DATE(YEAR(Sheet1!$A$1),MONTH(Sheet1!$A$1)-4+COLUMN(A$1),1) in cell A1 and drag copy across your five columns.

Custom format Cells A1 to D1 as "mmm" and Cell E1 as "yyyy"
 
Upvote 0
Thanks for the response! Is it possible to set this up so it automatically populates the columns on the second sheet? I do not want to have to drag/copy/reformat every time I enter a date on the first sheet. Trying to find a way to automatically do this no matter what date I put in - and on the second sheet the correct number of columns always is generated. Thanks for the help!
 
Upvote 0
Not sure quite what you want to achieve as the solution I suggested is dynamic? You can change the date in A1 and Sheet2 headers in row 1 will change.

If you have other data on Sheet1, say sales in columns by month, and that needs to be shown on Sheet2 for say a summary for the last quarter, there are certainly ways of doing that. You need to clarify the full extent of your problem.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top