Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Sorting 100 rows of 6 records horizontally

I would like to sort the 6 records in each separate row (100 total) ascending.
Is there a built-in function to do that.

I tried to use the macro recorder to sort the rows manually but 100 is too tedious, I would appreciate any hints for a killer macro..

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Sorting 100 rows of 6 records horizontally

perhaps you could transpose the 6cols x 100 rows to 100 cols x 6 rows, use
the columns.sort method (or some such) to sort each column alone, then
retranspose to 6 x 100.

--
Bob Kilmer

"Victor" wrote in message
...
I would like to sort the 6 records in each separate row (100 total)

ascending.
Is there a built-in function to do that.

I tried to use the macro recorder to sort the rows manually but 100 is too

tedious, I would appreciate any hints for a killer macro..

TIA



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Sorting 100 rows of 6 records horizontally

I had already tried that but it only sorts the first 3
columns at the max


-----Original Message-----
perhaps you could transpose the 6cols x 100 rows to 100

cols x 6 rows, use
the columns.sort method (or some such) to sort each

column alone, then
retranspose to 6 x 100.

--
Bob Kilmer

"Victor" wrote in

message
...
I would like to sort the 6 records in each separate row

(100 total)
ascending.
Is there a built-in function to do that.

I tried to use the macro recorder to sort the rows

manually but 100 is too
tedious, I would appreciate any hints for a killer macro..

TIA



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Sorting 100 rows of 6 records horizontally

Go programmatically thru the columns, sorting each column itself, not the
entire range of columns.

--
Bob Kilmer

"Victor" wrote in message
...
I had already tried that but it only sorts the first 3
columns at the max


-----Original Message-----
perhaps you could transpose the 6cols x 100 rows to 100

cols x 6 rows, use
the columns.sort method (or some such) to sort each

column alone, then
retranspose to 6 x 100.

--
Bob Kilmer

"Victor" wrote in

message
...
I would like to sort the 6 records in each separate row

(100 total)
ascending.
Is there a built-in function to do that.

I tried to use the macro recorder to sort the rows

manually but 100 is too
tedious, I would appreciate any hints for a killer macro..

TIA



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Sorting 100 rows of 6 records horizontally

Option Explicit

Sub SortColumns()
Dim rng As Range
Dim col As Range

Set rng = Workbooks("Book2.xls").Worksheets("Sheet1").Column s
For Each col In rng
rng.Sort col
Next
End Sub

Change rng to whatever range you like. Perhaps, for your case,

Set rng = Workbooks("Book2.xls").Worksheets("Sheet1").Column s("A:CV")
'100 columns

There are also clever ways to select the range dynamically, or you can use
the active selection (called Selection).

--
Bob Kilmer

"Victor" wrote in message
...
I had already tried that but it only sorts the first 3
columns at the max


-----Original Message-----
perhaps you could transpose the 6cols x 100 rows to 100

cols x 6 rows, use
the columns.sort method (or some such) to sort each

column alone, then
retranspose to 6 x 100.

--
Bob Kilmer

"Victor" wrote in

message
...
I would like to sort the 6 records in each separate row

(100 total)
ascending.
Is there a built-in function to do that.

I tried to use the macro recorder to sort the rows

manually but 100 is too
tedious, I would appreciate any hints for a killer macro..

TIA



.



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
Help for Medical Records sorting Gerry St Excel Worksheet Functions 4 April 10th 10 02:35 AM
Selecting vertical rows and displaying them horizontally. chrisvail Excel Discussion (Misc queries) 2 October 6th 09 11:48 PM
Sorting Individual Rows Horizontally Jon Ballard Excel Discussion (Misc queries) 2 June 24th 09 07:22 PM
How to turn rows horizontally to form columns? Wilhelm Excel Worksheet Functions 3 July 4th 06 12:20 PM
Sorting Records reese Excel Discussion (Misc queries) 2 April 7th 05 11:02 PM


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