Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sorting by more than 3 Fields in VBA

Is it possible to sort a Spreadsheet in Excel using VBA by more than 3
fields (which is the limit of the Excel functionality)?
Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 196
Default Sorting by more than 3 Fields in VBA

Is it possible to sort a Spreadsheet in Excel using VBA
by more than 3 fields (which is the limit of the Excel
functionality)?

You would need to do it the same as you would in Excel.

Sort by the lower level sorts, and then resort by the
higher level sorts.

In the Help:

Search on 'Sort'
Select 'Sort rows based on the contents of two or more
columns'
Steps 3 and 4 explain how to sort with more than three
sort levels.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Sorting by more than 3 Fields in VBA

Hi Kiko. I was searching Google concerning sorting and saw your
posting. I have created a form that allows you to sort by any/all
available columns, ascending or descending, allows you to change the
range, etc.. If you'd like a copy, just send me an email to my home
address ). I'll send you a zip file. I wrote
this a couple of nights ago so there may be bugs but, I'll tell you,
I've already found it invaluable (I'm an Accountant and manipulate a
LOT of data).
CYA...There is no warranty explicit or implied by this offer.
Don't know if you still need this as your posting was in July'04 and
it's already December.
Sincerely,
Gary Brown


Kiko wrote:
Is it possible to sort a Spreadsheet in Excel using VBA by more than

3
fields (which is the limit of the Excel functionality)?
Thanks


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Sorting by more than 3 Fields in VBA

Excel has a limit of 3 fields for any one sort operation. You can get around
this by doing a reverse sort. That is if you want to sort by Columns (in
order) A B C D then simple do individual sorts in the order D C B A. In this
way you will have sorted all 4 columns correctly.

Hope this helps...

"unknown" wrote:

Community Message Not Available

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
Sorting With dynamic Fields man4mac Excel Worksheet Functions 1 July 26th 06 06:12 PM
Sorting Spreadsheet with Merged Fields Linda L Excel Discussion (Misc queries) 1 January 22nd 05 12:58 AM
Sorting Merged Sum Fields Mike T. Excel Worksheet Functions 1 December 11th 04 03:12 PM
Sorting Page fields in PivotTable Todd Huttenstine Excel Programming 1 May 14th 04 08:57 PM
Sorting embedded fields - control box Cheryl[_2_] Excel Programming 0 May 6th 04 09:01 PM


All times are GMT +1. The time now is 01:34 PM.

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"