From smallest to largest without repeating

vacho

New Member
Joined
Dec 13, 2011
Messages
18
Hello,

I have data consisting of 20 numbers from 1 to 63. Within 20 some numbers can appear twice or even more. I want excel to sort this numbers in smallest to largest format ignoring repeating numbers.

Thank you
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Assuming your data is in a column, select the column, on the ribbon > Data > Data Tools > Remove Duplicates > Sort & Filter > Sort A to Z (down arrow).

HTH
Regards,
Howard
 
Upvote 0
Sorry, I forgot to mention that my data are scattered and I want to paste them in one column
 
Upvote 0
Hello,

I have data consisting of 20 numbers from 1 to 63. Within 20 some numbers can appear twice or even more. I want excel to sort this numbers in smallest to largest format ignoring repeating numbers.

Thank you

Values#Sorted#
77
5912
3815
1232
3636
2938
3457
1559
40
58
12
8
38
32
57
7
36
15
27
49

<colgroup><col style="width: 48pt;" span="2" width="64"> <tbody>
</tbody>

B2, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IFERROR(SMALL(IF(1-ISNUMBER(MATCH($A$2:$A$21,$B$1:B1,0)),$A$2:$A$21),
  ROWS($B$2:B2)),"")

Is this what you wanted?
 
Upvote 0
Values#Sorted#
77
5912
3815
1232
3636
2938
3457
1559
40
58
12
8
38
32
57
7
36
15
27
49

<colgroup><col style="width: 48pt;" span="2" width="64"> <tbody>
</tbody>

B2, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IFERROR(SMALL(IF(1-ISNUMBER(MATCH($A$2:$A$21,$B$1:B1,0)),$A$2:$A$21),
  ROWS($B$2:B2)),"")

Is this what you wanted?

You can shorten up your formula by using "ISNA" instead of "1-ISNUMBER"

=IFERROR(SMALL(IF(ISNA(MATCH(A$2:A$21,B$1:B1,)),A$2:A$21),ROWS(B$2:B2)),"")
 
Upvote 0
You can shorten up your formula by using "ISNA" instead of "1-ISNUMBER"

=IFERROR(SMALL(IF(ISNA(MATCH(A$2:A$21,B$1:B1,)),A$2:A$21),ROWS(B$2:B2)),"")
.
It appears to me that the following are missing form the suggested solution?:
8
27
29
34
40
49
58
 
Upvote 0
.
It appears to me that the following are missing form the suggested solution?:
8
27
29
34
40
49
58

You are right, but it's my fault...
Values15
7#Sorted#
597
388
1212
3615
2927
3429
1532
4034
5836
1238
840
3849
3257
5758
759
36
15
27
49

<colgroup><col style="width: 48pt;" span="2" width="64"> <tbody>
</tbody>

B1, control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(FREQUENCY(IF($A$2:$A$21<>"",MATCH($A$2:$A$21,$A$2:$A$21,0)),
  ROW($A$2:$A$21)-ROW($A$2)+1),1))

B3, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IF(ROWS($B$3:B3)<=$B$1,
  MIN(IF(1-ISNUMBER(MATCH($A$2:$A$21,$B$2:B2,0)),$A$2:$A$21)),"")

By the way:
Rich (BB code):
=IF(ROWS($B$3:B3)<=$B$1,MIN(IF(ISNUMBER(MATCH($A$2:$A$21,$B$2:B2,0)),"",
  $A$2:$A$21)),"")

is okay too.
 
Upvote 0
Excel Workbook
AB
1ValuesSort
277
3598
43812
51215
63627
72929
83432
91534
104036
115838
121240
13849
143857
153258
165759
177
1836
1915
2027
2149
Sheet1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top