Welcome to the Excel Forum

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.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 07-04-2009, 04:37 PM
lesley_51 lesley_51 is offline
Registered User
 
Join Date: 04 Jul 2009
Location: Queensland, Australia
MS Office Version:Excel 2007
Posts: 4
lesley_51 is becoming part of the community
Sorting multiple rows/columns

Please Register to Remove these Ads

Hi
I have a very large spreadsheet with a number of columns of random figures. To sort these lowest to highest I have been transposing the sections of rows requiring sorting to columns and sorting each column separately. Then transposing them back again. Is there an easier way of doing this please
Reply With Quote
  #2  
Old 07-04-2009, 04:48 PM
shg's Avatar
shg shg is offline
Forum Guru
 
Join Date: 20 Jun 2007
Location: The Great State of Texas
MS Office Version:2003, 2007
Posts: 18,491
shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay
Re: Sorting multiple rows/columns

There is an option to sort left to right -- does that do what you want?
__________________
Entia non sunt multiplicanda sine necessitate.
Reply With Quote
  #3  
Old 07-04-2009, 07:34 PM
lesley_51 lesley_51 is offline
Registered User
 
Join Date: 04 Jul 2009
Location: Queensland, Australia
MS Office Version:Excel 2007
Posts: 4
lesley_51 is becoming part of the community
Re: Sorting multiple rows/columns

thanks shg, i wish. no not that easy. i have about 3000 rows of about 15 columns. columns 3 to 9 have data i need to sort lowest to highest and doing them individually is taking forever. can't find a way to do multiple sorts
Reply With Quote
  #4  
Old 07-04-2009, 07:40 PM
shg's Avatar
shg shg is offline
Forum Guru
 
Join Date: 20 Jun 2007
Location: The Great State of Texas
MS Office Version:2003, 2007
Posts: 18,491
shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay
Re: Sorting multiple rows/columns

Post an example and explain what you need?
__________________
Entia non sunt multiplicanda sine necessitate.
Reply With Quote
  #5  
Old 07-05-2009, 03:25 AM
lesley_51 lesley_51 is offline
Registered User
 
Join Date: 04 Jul 2009
Location: Queensland, Australia
MS Office Version:Excel 2007
Posts: 4
lesley_51 is becoming part of the community
Re: Sorting multiple rows/columns

here is a very basic idea of what im working on. i need to sort lowest to highest column c(44) to column i (38). i have nearly 4 thous rows to sort any help would be very welcome.

PKL 1/05/2009 44 43 34 4 18 10 38
LTI 2/05/2009 34 43 7 4 39 13 9
FTR 2/05/2009 22 35 33 5 27 34 26
YLM 2/05/2009 30 38 37 29 31 24 34
PKL 4/05/2009 45 6 4 26 16 42 37
TPL 4/05/2009 28 25 21 6 19 32 22
DAI 6/05/2009 45 32 34 31 21 42 10
PKL 7/05/2009 26 42 1 12 34 15 21

Last edited by lesley_51; 07-05-2009 at 03:27 AM. Reason: more explanation
Reply With Quote
  #6  
Old 07-05-2009, 05:26 AM
martindwilson's Avatar
martindwilson martindwilson is offline
Forum Guru
 
Join Date: 23 Jun 2007
Location: London,England
MS Office Version:office 97 ,2003 ,2007
Posts: 6,073
martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding martindwilson Has a higher level of understanding
Re: Sorting multiple rows/columns

try this macro ammended from one i got here
http://forums.techguy.org/business-a...thin-rows.html (have a look and see the nice friendly thread, NOT lol)

Code:
Sub Test()
Dim RgToSort As Range
Dim RgRow As Range
Application.ScreenUpdating = False

Set RgToSort = Range(Range("C1:I1"), Range("C1:I1").End(xlDown))

For Each RgRow In RgToSort.Rows
    RgRow.Sort Key1:=Range(RgRow.Item(1).Address), Order1:=xlAscending, Orientation:=xlLeftToRight, OrderCustom:=1
Next
Application.ScreenUpdating = True
End Sub
__________________
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code

how to enter array formula


recommended reading
wiki Mojito

how to say no convincingly

most important think you need

Last edited by martindwilson; 07-05-2009 at 05:31 AM.
Reply With Quote
  #7  
Old 07-05-2009, 06:46 PM
lesley_51 lesley_51 is offline
Registered User
 
Join Date: 04 Jul 2009
Location: Queensland, Australia
MS Office Version:Excel 2007
Posts: 4
lesley_51 is becoming part of the community
Re: Sorting multiple rows/columns

Thank you martin will try this although never dabbled in macros before. Will be fun
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Forum Jump