Pipedream? Will excel automatically reposition columns?

carolvshimmer

New Member
Joined
Jan 11, 2005
Messages
20
I'm working on a monthly schedule recap, the months go across the first row, the first column has everybodys' names. The schedule has many references to other sheets in the workbook. What I want to happen is for the most recent month that has passed to be the first one to the left of everybodys' names, and then the months go down in order. So this has to change every month. Is there anyway to get Excel to automatically move the columns containing the prior month to the end of the row and then set up a new column/set of columns for the most recent month? Basically I want to get out of a lot of copying and pasting

Hope this makes sense.....thanks
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
carolvshimmer said:
I'm working on a monthly schedule recap, the months go across the first row, the first column has everybodys' names. The schedule has many references to other sheets in the workbook. What I want to happen is <font color="red">for the most recent month that has passed to be the first one to the left of everybodys' names, and then the months go down in order</font>. So this has to change every month. Is there anyway to get Excel to automatically move the columns containing the prior month to the end of the row and then set up a new column/set of columns for the most recent month? Basically I want to get out of a lot of copying and pasting

Hope this makes sense.....thanks
Hi Carol:

Please refer to the part of your statement I have red fonted ... do you mean the for the most recent month that has passed to be the first one to the right of everybodys' names ....

or am I missing something else here?
 
Upvote 0
Hi Carol:

Let us have a look at the following ...
Book2
ABCDEFGHIJKLMNO
11MostRecentMonthnext1next2next3next4next5next6next7next8next9next10next11next12next13
2Name121234567891011121
3Carol
4Becky
5Joe
Sheet4


formula in cell A1 is ...=month(now())

and my convoluted formula in cell B2 is ...

=MOD($A$1-1+COLUMNS($A:A)-1,12)+(MOD($A$1-1+COLUMNS($A:A)-1,12)=0)*12
this is then copied across. I hope this helps!
 
Upvote 0
Here How I would have done it.
I would have kept the actual monthly recap information on a separate sheet, but adding the following formula and pasted across.

This formula tells you how many months this was before the Month in cell A1. (or must make it Month(now()))

=IF(MONTH(B2)-MONTH($A$1)<=0,MONTH(B2)-MONTH($A$1),MONTH(B2)-MONTH($A$1)-12)
Book1
ABCDEF
16/15/2004-5-4-3-2-1
2Names1-Jan1-Feb1-Mar1-Apr1-May
3CarolDataToBe
4BeckyExamRandomOr
5JoeFoolsDayNot
Schedule Recap

On another page, I would then use an Hlookup to display the information for this month, then 1 month ago etc.
I used the following:
=HLOOKUP(0,Recap,ROW(),0)

Where Recap is the original information, and the Row with the 0,-1,-2 etc. is the first Row.
Book1
ABCDE
1ThisMonthLastM2ago3ago
21-Jun1-May1-Apr1-Mar
3Names0Be00
4Carol0Or0Random
5BeckyItemsNotFoolsDay0
6Joe0000
Recent Months Left
 
Upvote 0

Forum statistics

Threads
1,207,439
Messages
6,078,573
Members
446,349
Latest member
Malroos7912

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