#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Custom Sort

How do I sort a range on a column with numbers (integers) so that all record
having a zero in that column will be at the end of the list.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Custom Sort

You would need to use a helper column that will be your first sort key. Put
a formula in that column that will produce a result that sorts to the bottom
if the referenced column contains a zero.

=if(c2=0,"Z","A")

drag fill down the dummy column.

--
Regards,
Tom Ogilvy

"Rafi" wrote in message
...
How do I sort a range on a column with numbers (integers) so that all

record
having a zero in that column will be at the end of the list.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Custom Sort

My answer assumed you wanted to sort ascending for the other numbers.

--
Regards,
Tom Ogilvy

"Rafi" wrote in message
...
How do I sort a range on a column with numbers (integers) so that all

record
having a zero in that column will be at the end of the list.

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Custom Sort

I need to execute the sort from VBA so I am afraid this will not work.

Thanks

"Tom Ogilvy" wrote:

You would need to use a helper column that will be your first sort key. Put
a formula in that column that will produce a result that sorts to the bottom
if the referenced column contains a zero.

=if(c2=0,"Z","A")

drag fill down the dummy column.

--
Regards,
Tom Ogilvy

"Rafi" wrote in message
...
How do I sort a range on a column with numbers (integers) so that all

record
having a zero in that column will be at the end of the list.

Thanks




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Sort lincservices Excel Worksheet Functions 1 June 10th 08 05:06 PM
Custom Sort Order Fishnerd Excel Discussion (Misc queries) 2 January 7th 08 06:24 AM
Custom Sort Steve Stanley Excel Discussion (Misc queries) 1 February 26th 07 09:39 PM
Excel sort by Fill Color by custom list sort Dash4Cash Excel Discussion (Misc queries) 2 July 29th 05 10:45 PM
Custom Data Sort Jim[_40_] Excel Programming 1 February 16th 04 07:28 PM


All times are GMT +1. The time now is 12:37 AM.

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

About Us

"It's about Microsoft Excel"