Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate changing columns in spreadsheet 1

Status
Not open for further replies.

dawnd3

Instructor
Jul 1, 2001
1,153
US
Hi All, I have a repeated task in Excel 2010 that I would like to automate. I often have to change the columns around to the same order as another spreadsheet so that I can merge the lists together into one worksheet. For instance, "Company" is always in column A, "Name" is always in Column B, that sort of thing. I know how to do the merge, I would just like a way to quickly re-arrange the columns to the order I want. (all would have the same column names, however, some would not contain all of the columns of data.)

Thank you for any tips,

Dawn

 


hi,

I would merge them using MS Query. faq68-5829

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi Skip, I don't think that is going to work because it doesn't match up the columns properly. Unless I did something wrong, it just seemed to add the table from one spreadsheet at the bottom of the previously appended table without regard to columns lining up. Thanks for the idea! I would love to get it to work.

Dawn

 
The columns can be in ANY order!

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Hi,
You can re-arrange the order of columns by doing a custom sort. In Excel 2007 and later, add a new row below the column headings. Each column must have a heading. Number the columns the way you want them to appear, making sure to have a number in each column.

Home tab
Sort & Filter
Custom Sort
Click the Options button
Select "Sort Left to Right"

Then select the row number of the new row you added.

That will sort the columns according to the order you set.

Hope this helps,







Best,
Blue Horizon [2thumbsup]
 
Thanks guys! I finally figured out how to import a bunch of spreadsheets at once to Access, so I think I can by pass this stuff in Excel. It is still nice to know. I didn't know you could do a custom column sort! That's pretty cool!

Thanks,

Dawn

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top