Reducing a list of numbers

E

Ernie Fenwick

How can I reduce a list of numbers with several
repetitions to a list only showing 1 instance of each
number. ie 3,5,7,3,4,8,4,3,6,5 to 3,4,5,6,7,8

Thanks

Ernie Fenwick
 
D

Dave R.

You can use a formula in the next column, that will return the value of the
list-item if there is only 1 of that value in that list.

It's called extracting unique entries from a list, and you can find
information here.
http://www.cpearson.com/excel/duplicat.htm#ExtractingUnique

If you wanted to automate it, you could either use this formula in a macro,
then do the following copying/pasting over your current list which contains
duplicates, or do the whole thing in visual basic, but the formula would be
the easiest way to go.
 
P

Peo Sjoblom

If they are in one cell, use data>text to columns and comma as delimiter,
then apply advanced>filter unique records only and copy to another location.
If they are in separate cells repeat the latter part but not the data>text
to columns..
 
P

Peo Sjoblom

You can do that in one fell swoop, assuming the numbers are in
A2:A20, array enter this formula in B2 and copy down until you get
a zero (in case there is a zero in the list then copy down until you get an
error)

=INDEX($A$2:$A$20,MATCH(0,COUNTIF($B$1:B1,$A$2:$A$20),0))

array enter = ctrl + shift & enter

works for text as well

Note that the formula has to be entered in the same column one cell below as
the first countif
reference
 
H

Harlan Grove

How can I reduce a list of numbers with several
repetitions to a list only showing 1 instance of each
number. ie 3,5,7,3,4,8,4,3,6,5 to 3,4,5,6,7,8

With worksheet functionality only, if the whole list has each number in a
separate cell in A1:A10, you could enter the following formulas in B1 and B2.

B1: =A1
B2: =INDEX($A$1:$A$10,MATCH(0,COUNTIF(B$1:B1,$A$1:$A$10),0))

Select B2 and fill it down until formulas evaluate #N/A.
 
M

Max

Think Harlan missed out <g> mentioning that
his formula in B2 needs to be array-entered

Hold down Ctrl & Shift keys, press Enter
(instead of just pressing Enter)
 

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

Top