Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sort row values descending

I need to sort values in a row in descending order.

Example:
1,5,6,7
2,6,3,5
3,2,8,1

Should sort:
7,6,5,1
6,5,3,2
8,3,2,1

I can't figure out the code to do this. Any help?
Here's what I have so far:

For Each rw In Worksheets("qrysctrucks").Rows
rw.Select
Selection.Sort Key1:=Rows(1), Order1:=xlDescending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlLeftToRight, _
DataOption1:=xlSortNormal
Next rw

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
For Each Sheet in Range - Sort Descending NPell Excel Worksheet Functions 7 September 2nd 08 01:31 PM
Sort macro with descending [email protected] New Users to Excel 16 August 16th 07 09:03 PM
Ascending Sort formula, change to neg #: descending sort.. nastech Excel Discussion (Misc queries) 6 July 2nd 07 11:00 PM
how do i sort a set of averages and have them list in descending o ucastores Excel Worksheet Functions 7 September 3rd 06 09:10 AM
how can I hide sort ascending and sort descending options in the . vida Excel Discussion (Misc queries) 0 December 11th 04 12:31 AM


All times are GMT +1. The time now is 03:19 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"