Hello
How can I get excel to look up a column, copy the data over to another
worksheet, deleting all the duplicate names. So I have a nice list of
names.
Or some pointers would do.
Thanks
Billy Liddel - 16 Jun 2007 10:48 GMT
Dewi
Biff (T.Valco) wrote a formula for this under "unique values" I think.
However, a macro will do the same. The following code will ceate a list on
the same page two column to the right of your current data, so make sure that
you do not have any data in this column.
Select your column and run the code after you have pasted it into a VB
Module. (ALT + F11, Insert, Module)
Sub listUnique()
Set rng = Selection
l = Selection.Rows.count
r = ActiveCell.Row: startR = ActiveCell.Row
col = ActiveCell.CurrentRegion.Columns.count + 2
Set lst = Range(Cells(startR, col), Cells(r, col))
For Each d In rng
Set lst = Range(Cells(startR, col), Cells(r, col))
x = Application.Match(d, lst, 0)
If IsError(x) Then
Cells(r, col) = d
r = r + 1
End If
Next
End Sub
Regards
Peter
> Hello
>
[quoted text clipped - 5 lines]
>
> Thanks
Bernd P - 16 Jun 2007 11:33 GMT
Hello,
http://www.sulprobil.com/html/listfreq.html
Regards,
Bernd
Gord Dibben - 16 Jun 2007 15:55 GMT
Data>Filter>Advanced Filter>Unique records only>Copy to another location.
See Debra Dalgleish's site for more instruction on this.
http://www.contextures.on.ca/xladvfilter01.html#FilterUR
Gord Dibben MS Excel MVP
>Hello
>
[quoted text clipped - 5 lines]
>
>Thanks
Dewi... - 17 Jun 2007 09:09 GMT
> Hello
>
[quoted text clipped - 5 lines]
>
> Thanks
Thanks to all, i'm nearly there :-)