ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sorting number in multiple rows (https://www.excelbanter.com/excel-discussion-misc-queries/238758-sorting-number-multiple-rows.html)

sluvian

Sorting number in multiple rows
 
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

Luke M

Sorting number in multiple rows
 
You might want to take a look at this similar thread:

http://www.microsoft.com/office/comm...9-e3859c74e9c4
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"sluvian" wrote:

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


Lars-Åke Aspelin[_2_]

Sorting number in multiple rows
 
On Mon, 3 Aug 2009 10:18:01 -0700, sluvian
wrote:

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$1 00,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

sluvian

Sorting number in multiple rows
 
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?


"Lars-Ã…ke Aspelin" wrote:

On Mon, 3 Aug 2009 10:18:01 -0700, sluvian
wrote:

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$1 00,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


Lars-Åke Aspelin[_2_]

Sorting number in multiple rows
 
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$1 00,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$1 00,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



On Mon, 3 Aug 2009 12:50:01 -0700, sluvian
wrote:

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?


"Lars-Åke Aspelin" wrote:

On Mon, 3 Aug 2009 10:18:01 -0700, sluvian
wrote:

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$1 00,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




All times are GMT +1. The time now is 03:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com