Link to home
Start Free TrialLog in
Avatar of Sonia Bowditch
Sonia BowditchFlag for Guernsey

asked on

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
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

Is it just the two columns?

If so, import into column B and then Cut and paste column C back to column A
Avatar of Sonia Bowditch

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Rob Henson
Rob Henson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks I do think that will work.
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.
I will do that.  Thanks very much for your help.
Glad to be of help.