Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ian
 
Posts: n/a
Default excel within row sorting problem

I have the following data in a worksheet
i have 800 rows of differing values.

For any 1 row:
Important note: it is in pairs, that is columns A,B is pair 1, C,D is pair
2, E,F is pair 3.

i want to sort it WITHIN ROW on columns b,d,f, with the smallest value in
b,d or f first then the next largest then the largest.

For example
A B C D E F
5 12 2 3 1 6

would become
A B C D E F
2 3 1 6 5 12

b=3
d=6
f=12
this is what i want, the pairs sorted in ascending order for b,d,f for a
given row.
is this possible?

this answer is for 1 row:

A2: =B1
B2: =B1

then copy across as many columns as you need

then sort rows 1 and 2 with row 2 as the sort by row


But I need to do this for 800 rows...

any help very much appreciated

thanks

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

First, I don't understand everything after:
this answer is for 1 row:


But this might do the first half--but with a catch.

Do you have any ties in any rows in columns B,D,F (with different values in
A,C,E for that tie?

5 12 2 6 1 6

would cause trouble since 6 occurs both in D and F, but columns C and E are not
the same.

If there are no ties--or if there are ties, but both sets of values are the
same, then I could do this:

Using 6 helper columns (I used G:L).

(I had headers in row 1, so my formulas started in row 2.)

In H2: =LARGE((B2,D2,F2),3)
In J2: =LARGE((B2,D2,F2),2)
In L2: =LARGE((B2,D2,F2),1)

In G2, I2, K2 (all the same formula):
=INDEX($A2:$F2,MATCH(H2,$A2:$F2,0)-1)

And drag down the range.

============
If this doesn't work for you, you may want to give more of a snipped of data
(for testing) and rephrase what you meant by the second half of your question.

Ian wrote:

I have the following data in a worksheet
i have 800 rows of differing values.

For any 1 row:
Important note: it is in pairs, that is columns A,B is pair 1, C,D is pair
2, E,F is pair 3.

i want to sort it WITHIN ROW on columns b,d,f, with the smallest value in
b,d or f first then the next largest then the largest.

For example
A B C D E F
5 12 2 3 1 6

would become
A B C D E F
2 3 1 6 5 12

b=3
d=6
f=12
this is what i want, the pairs sorted in ascending order for b,d,f for a
given row.
is this possible?

this answer is for 1 row:

A2: =B1
B2: =B1

then copy across as many columns as you need

then sort rows 1 and 2 with row 2 as the sort by row

But I need to do this for 800 rows...

any help very much appreciated

thanks


--

Dave Peterson
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
Problem with Excel and MSVDM (XP Powertoys) Hinne Excel Discussion (Misc queries) 3 March 23rd 06 03:11 AM
Excel 2003 Slowness problem in Windows XP Elton Seng Yan Thung Excel Discussion (Misc queries) 2 May 18th 05 04:55 AM
Slight problem automating Excel in a service someone Setting up and Configuration of Excel 2 May 13th 05 10:04 PM
Excel problem with web based spreadsheets Steve Williams Excel Discussion (Misc queries) 0 January 12th 05 02:11 PM
Staring Excel Problem Everton Excel Discussion (Misc queries) 1 November 26th 04 09:22 PM


All times are GMT +1. The time now is 06:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"