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

Hi,

Is it possible to use the Sort method in Excel VBA to sort values contained
in a single row? If so, how? I tried this by declaring a range (which
represents cells in a single row) and the applying the sort method to this
range and this does not work.

I know this works for sorting columns, but I want to sort left to right
across a row. Any assistance is appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Sort across a single row

select the row and do Data=Sort, in the sort dialog, click the options
button and choose left to right.

If you need a macro, turn on the macro recorder while you do it manually.

--
Regards,
Tom Ogilvy


"Scott P" wrote:

Hi,

Is it possible to use the Sort method in Excel VBA to sort values contained
in a single row? If so, how? I tried this by declaring a range (which
represents cells in a single row) and the applying the sort method to this
range and this does not work.

I know this works for sorting columns, but I want to sort left to right
across a row. Any assistance is appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Sort across a single row

Thank you very much, Tom. This is a big help.

"Tom Ogilvy" wrote:

select the row and do Data=Sort, in the sort dialog, click the options
button and choose left to right.

If you need a macro, turn on the macro recorder while you do it manually.

--
Regards,
Tom Ogilvy


"Scott P" wrote:

Hi,

Is it possible to use the Sort method in Excel VBA to sort values contained
in a single row? If so, how? I tried this by declaring a range (which
represents cells in a single row) and the applying the sort method to this
range and this does not work.

I know this works for sorting columns, but I want to sort left to right
across a row. Any assistance is appreciated.

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
Link Data from several colums into a single one and sort Chimako Excel Discussion (Misc queries) 1 February 25th 10 01:36 PM
CAN YOU ALPHA SORT IN A SINGLE CELL? Precious Pearl Excel Discussion (Misc queries) 4 November 8th 07 09:17 PM
Single formula to 'sort' a list onto a second sheet? KR Excel Worksheet Functions 2 May 19th 06 02:08 PM
Sort across a single row Scott P Excel Programming 1 April 27th 06 08:44 PM
sort data in a single cell? Todd Excel Programming 2 April 30th 04 09:56 PM


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