A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sort .csv file



 
 
Thread Tools Display Modes
  #1  
Old January 8th, 2008, 11:30 PM posted to microsoft.public.excel.misc
Jeff
external usenet poster
 
Posts: 1,347
Default Sort .csv file

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
  #2  
Old January 8th, 2008, 11:47 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Sort .csv file

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

On Tue, 8 Jan 2008 15:30:00 -0800, Jeff wrote:

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


  #3  
Old January 9th, 2008, 12:01 AM posted to microsoft.public.excel.misc
Jeff
external usenet poster
 
Posts: 1,347
Default Sort .csv file

I am using excel 2003 so I need a macro.



"Gord Dibben" wrote:

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

On Tue, 8 Jan 2008 15:30:00 -0800, Jeff wrote:

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



  #4  
Old January 9th, 2008, 12:10 AM posted to microsoft.public.excel.misc
Trying
external usenet poster
 
Posts: 49
Default Sort .csv file

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.



"Jeff" wrote:

I am using excel 2003 so I need a macro.



"Gord Dibben" wrote:

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

On Tue, 8 Jan 2008 15:30:00 -0800, Jeff wrote:

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



  #5  
Old January 9th, 2008, 12:20 AM posted to microsoft.public.excel.misc
Jeff
external usenet poster
 
Posts: 1,347
Default Sort .csv file

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???

"TRYING" wrote:

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.



"Jeff" wrote:

I am using excel 2003 so I need a macro.



"Gord Dibben" wrote:

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

On Tue, 8 Jan 2008 15:30:00 -0800, Jeff wrote:

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


  #6  
Old January 9th, 2008, 12:29 AM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Sort .csv file

Excel 2003 does not have 150,000 rows......65536 is maximum per worksheet.

Do you want a macro that will import the 150,000 rows?

See this KB article for code to import across several worksheets 65536 rows at a
time.

http://support.microsoft.com/default...;en-us;Q120596


Gord


On Tue, 8 Jan 2008 16:01:00 -0800, Jeff wrote:

I am using excel 2003 so I need a macro.



"Gord Dibben" wrote:

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

On Tue, 8 Jan 2008 15:30:00 -0800, Jeff wrote:

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




  #7  
Old January 9th, 2008, 12:36 AM posted to microsoft.public.excel.misc
Jeff
external usenet poster
 
Posts: 1,347
Default Sort .csv file

Thanks that will help me a lot!!

"Gord Dibben" wrote:

Excel 2003 does not have 150,000 rows......65536 is maximum per worksheet.

Do you want a macro that will import the 150,000 rows?

See this KB article for code to import across several worksheets 65536 rows at a
time.

http://support.microsoft.com/default...;en-us;Q120596


Gord


On Tue, 8 Jan 2008 16:01:00 -0800, Jeff wrote:

I am using excel 2003 so I need a macro.



"Gord Dibben" wrote:

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

On Tue, 8 Jan 2008 15:30:00 -0800, Jeff wrote:

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




  #8  
Old January 9th, 2008, 12:57 AM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Sort .csv file

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

On Tue, 8 Jan 2008 16:36:00 -0800, Jeff wrote:

Thanks that will help me a lot!!

"Gord Dibben" wrote:

Excel 2003 does not have 150,000 rows......65536 is maximum per worksheet.

Do you want a macro that will import the 150,000 rows?

See this KB article for code to import across several worksheets 65536 rows at a
time.

http://support.microsoft.com/default...;en-us;Q120596


Gord


On Tue, 8 Jan 2008 16:01:00 -0800, Jeff wrote:

I am using excel 2003 so I need a macro.



"Gord Dibben" wrote:

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

On Tue, 8 Jan 2008 15:30:00 -0800, Jeff wrote:

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





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.