Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with Excel and MSVDM (XP Powertoys) | Excel Discussion (Misc queries) | |||
Excel 2003 Slowness problem in Windows XP | Excel Discussion (Misc queries) | |||
Slight problem automating Excel in a service | Setting up and Configuration of Excel | |||
Excel problem with web based spreadsheets | Excel Discussion (Misc queries) | |||
Staring Excel Problem | Excel Discussion (Misc queries) |