Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 97
Default macro to sort right to left

Help please!

I need a macro to sort numbers left-to-right in cells C2 to G2

these numbers continue down the columns for about 600

I can't get the macro I need to move down a sort each row in turn.

Thanks in advance

Steve
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default macro to sort right to left

Steve,

You may need to change xlAscending to xlDescending:

Sub SteveSort()
Dim myC As Range

For Each myC In Range(Range("C2"), Cells(Rows.Count, 3).End(xlUp))
myC.Resize(1, 5).Sort Key1:=myC, _
Order1:=xlAscending, Orientation:=xlLeftToRight
Next myC
End Dub

HTH,
Bernie
MS Excel MVP



"Steve" wrote in message ...
Help please!

I need a macro to sort numbers left-to-right in cells C2 to G2

these numbers continue down the columns for about 600

I can't get the macro I need to move down a sort each row in turn.

Thanks in advance

Steve

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
SORT BY: left to right Shevvie Excel Worksheet Functions 0 June 24th 08 02:47 PM
Macro to sort numeric rows left to right Carlton A. Barlow Excel Discussion (Misc queries) 14 December 3rd 07 05:41 AM
Sort Left-Right & Up-Down Ben Dummar Excel Worksheet Functions 0 April 4th 07 05:56 PM
SORT RIGHT-TO-LEFT IN EXCEL apprentice idiot Excel Worksheet Functions 11 November 25th 06 02:12 PM
Sort Left to Right David Excel Discussion (Misc queries) 1 February 3rd 05 04:18 PM


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