Sorting number in multiple rows

  • Thread starter Thread starter sluvian
  • Start date Start date
S

sluvian

I'm trying to sorting numbers in two seperate rows.
1 4
5 6
3 2
i want them to sort, and end up looking like this
1
2
3
4
5
6
 
I'm trying to sorting numbers in two seperate rows.
1 4
5 6
3 2
i want them to sort, and end up looking like this
1
2
3
4
5
6

Assuming that you mean two columns (not rows) as shown in your example
and that the numbers are in columns A and B starting on row 1.

If a certain number can only be present in at most one of the columns,
you may try the following formula in cell C1:

=IF(ISERROR(MATCH(SMALL($A$1:$B$100,ROW()),A$1:A$100,0)),"",SMALL($A$1:$B$100,ROW()))

Change the 100 in all places to fit the maximum size of your data in
columns A and B.

Copy this formula to cell D1 and then fill cells C1:D1 down as far as
needed.

If a certain number can be present in both columns, you have to
specify what the input should look like. Should the number be on one
or columns in the output? If two columns, in which column should the
number be listed first.

Hope this helps / Lars-Åke
 
That worked for 1,2 and 3.

there's 2 tables, same columns. how would i use that to sort the tables of
two columns?

does that make sense?
 
With the input according to your example, i.e.
1 in cell A1
4 in cell B1
5 in cell A2
6 in cell B2
3 in cell A3
2 in cell B3

and the proposed formula, that is
=IF(ISERROR(MATCH(SMALL($A$1:$B$100,ROW()),A$1:A$100,0)),"",SMALL($A$1:$B$100,ROW()))
in cells C1 to C6 and
=IF(ISERROR(MATCH(SMALL($A$1:$B$100,ROW()),B$1:B$100,0)),"",SMALL($A$1:$B$100,ROW()))
in cells D1 to D6

what output do you get in these cells
C1: ???
D1: ???
C2: ???
D2: ???
C3: ???
D3: ???
C4: ???
D4: ???
C5: ???
D5: ???
C6: ???
D6: ???

Lars-Åke
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Sorting Groups of Rows 1
Sorting a list of numbers 4
Sorting a linked list 3
Sort 6
Sort by Every Other Row? 0
sort below data 1
Sorting and Formulas 1
Import data csv file - tab delimited - and sort to column 3

Back
Top