Import Columns from CSV file in reverse order

Not sure this is even possible but thought I would ask...

I have a CSV file which is update periodically and a connection is refreshed in Excel.  The problem is I want the columns swapped around.

The data comes in as:

Name                                                   Enabled

I want it come in as:

Enabled                                              Name

Is this possible with the Text Import Wizard in Excel or through a different way?

Thanks.
Sonia
Sonia BowditchInformation Security OfficerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rob HensonFinance AnalystCommented:
Is it just the two columns?

If so, import into column B and then Cut and paste column C back to column A
0
Sonia BowditchInformation Security OfficerAuthor Commented:
It is two columns out of a CSV containing 6 columns and it is used for analysis purposes in a number of spreadsheets.  For this exercise I only want 2 columns which is column 1 and 2.
0
Rob HensonFinance AnalystCommented:
I am guessing, its not as simple as that.

How about this instead?

Above the imported data insert a new row. Number each column from left to right with 1 to whatever. Number the column for the position that you want them eg, 3, 4, 5, 6, 2, 1  where the last two column are what need to be swapped and placed as the first two columns.

Then highlight the data and use the Sort dialogue to re-arrange the columns.

With the Sort dialogue open, use the Options button at the top to specify Left to Right sort, then specify the new row as a "Sort By" Field. The column will then be arranged in the order required.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Sonia BowditchInformation Security OfficerAuthor Commented:
Thanks I do think that will work.
0
Rob HensonFinance AnalystCommented:
For ease of repetition, you can copy the 6 headers into a list in the order that you need them and then the numbering of the columns in the new row can be done with a formula. the following would be in A1 and copied across to F1.

=MATCH(A$2,$H$1:$H$6,0)   where H1:H6 is the list of headers in the correct order and A2 is the first header of the imported data.

When the new data is imported, import it into A2 and the formulas in row 1 will recalculate. Then do the Sort based on row 1.
0
Sonia BowditchInformation Security OfficerAuthor Commented:
I will do that.  Thanks very much for your help.
0
Rob HensonFinance AnalystCommented:
Glad to be of help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.