moving columns around?

etsoft

New Member
Joined
Jul 27, 2013
Messages
16
Hi,

i've got a table in excel where some of the columns headers have numbers , f.i. 20131 and 201212 ( year + month ), i want move these colums around so that 201212 come earlier or more to the left then 20131.
I can change the labels of the columns if needed.

Can this be done via vba?

The data comes from access and i have no way to alter the sequence there.

Regards
Erwin
 
Hi,

i've got a table in excel where some of the columns headers have numbers , f.i. 20131 and 201212 ( year + month ), i want move these colums around so that 201212 come earlier or more to the left then 20131.
I can change the labels of the columns if needed.

Can this be done via vba?

The data comes from access and i have no way to alter the sequence there.

Regards
Erwin

Can you change the labels so that the numbers are all 6 digits yyyymm; 201212, 201301 ? If yes, you could then select your numbered columns and select from the menu Data\Sort. It has an option to Sort Left to Right.This can be recorded to a macro.
 
Upvote 0
Can you change the labels so that the numbers are all 6 digits yyyymm; 201212, 201301 ? If yes, you could then select your numbered columns and select from the menu Data\Sort. It has an option to Sort Left to Right.This can be recorded to a macro.

Yes, thats it! Many thanks.
 
Upvote 0

Forum statistics

Threads
1,226,848
Messages
6,193,318
Members
453,790
Latest member
yassinosnoo1

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