MrExcel's Learn Excel #544 - Rearranging all Columns

If you like this content, please consider visiting the video on YouTube and subscribe to the MrExcel Channel to show your support!
This video has been published on Jul 29, 2009.
In yesterdays podcast, I showed how to rearrange one column. But what if you need to rearrange all of the columns? Episode 544 shows how to use a little known sorting trick to sort the columns back to the original sequence.

This blog is the video podcast companion to the book, Learn Excel from MrExcel. Download a new two minute video every workday to learn one of the 277 tips from the book!
maxresdefault.jpg


Transcript of the video:
Welcome back to the MrExcel netcast, I'm Bill Jelen.
In yesterday's netcast we talked about if we had to rearrange one column to another place it was a simple cut and then insert cut cells that reminded me there's this really cool trick in case your columns are completely in the wrong sequence, we have a data set here and I want to basically rearrange every single column and so I'm going to insert a new row just above the data set, and I'm going to add sequence number so I'm going to let's say customer numbers first street, is second, city's third, state and zip are fourth and fifth, and then probably invoice number, invoice date and amount.
Now here's what I want to do I'm going to go to the data menu and choose sort data sort and in the options tab I'm going to say instead of sorting top to bottom which is the usual way, I want to sort left to right, now once I do this then instead of headings I basically just can sort by Row 1, Row 2, Row 3, well of course I want to sort by Row 1 and ascending sequence and click OK, and is now rearranged all the columns it doesn't keep the column widths with the original columns so of course you want to go through and select all of your data and then use format column autofit selection in order to make everything in line.
Now in Excel 2007 of course they change the sorting routine a little bit same thing you'll insert a new row with the different numbers go to the data tab of the ribbon, click the big sort button, and then there's an options button at the top or we can say that we want to sort left to right, and then of course you'll be able to say that it's going to be by Row 1 smallest to largest, click OK and again it'll take care of it in Excel 2007.
So most of the time when we're sorting we're sorting the Rose I'm in this case though it's very unusual we can sort the columns basically just add a temporary row up there with the correct column sequence, and you can sort the data into the right sequence.
Hey thanks for stopping by, we'll see you on Monday for another netcast from MrExcel.
 

Forum statistics

Threads
1,215,055
Messages
6,122,902
Members
449,097
Latest member
dbomb1414

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