Sort .csv file

J

Jeff

Hi,

I am exporting a .csv file from access. Here is the problem, the file is
sorted in access but when it is exported the file is not sorted anymore.

The csv file has 4 columns and 150,000 rows. I want to sort by column 1 and
then column 2. Is there a macro online already created that can do this.

Thanks for your help
 
G

Gord Dibben

Jeff

Should be easy enough to record a macro whilst doing the sort as you want.

With 150,000 rows I assume version 2007 so I can't help at all with how to
record a macro in that version.


Gord Dibben MS Excel MVP
 
J

Jeff

I am using excel 2003 so I need a macro.



Gord Dibben said:
Jeff

Should be easy enough to record a macro whilst doing the sort as you want.

With 150,000 rows I assume version 2007 so I can't help at all with how to
record a macro in that version.


Gord Dibben MS Excel MVP
 
T

TRYING

Excel 2003 only goes up to 65,536 rows so presumably you are using Excel 2007.

In any case, I don't think you would be gaining much by using a macro for a
simple sort, especially if this is a one-time task, or even an occasional
one. If you have to do it over and over again, then a macro might help, but
not by much.

Just select the whole list (all 4 columns and all rows), then Data\Sort\Sort
by A, Then by B, and let it rip.
 
J

Jeff

I DO NOT HAVE EXCEL 2007.

SO THEREFORE I CANNOT SORT A CSV FILE THAT IS 150,000 ROWS

Therefore I need a macro.

Can you help???
 
G

Gord Dibben

Glad to hear.

Some confusion lead us to believe you were using Excel 2007.

Your original post stated "when it is exported the file is not sorted anymore"

which to me sounds like you actually got the 150,000 rows into Excel.


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top