View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default How can I paste a unique values list?

Sub makeuniquelist()
Application.ScreenUpdating = False
mc = "a"
lr = Cells(Rows.Count, mc).End(xlUp).Row
With Range("A1:A" & lr)
.AdvancedFilter Action:=xlFilterInPlace, Unique:=True
.Copy Range("F1")
Application.CutCopyMode = False
ActiveSheet.ShowAllData
End With

'don't need the rest but you may want to look at it
flr = Cells(Rows.Count, "f").End(xlUp).Row
For Each c In Range("f2:f" & flr)
With Sheets("sheet9")
dlr = .Cells(Rows.Count, "a").End(xlUp).Row + 1
Range("A1:a" & lr).AutoFilter Field:=1, Criteria1:=c
'MsgBox c
Range("A2:a" & lr).Copy .Cells(dlr, "a")
Range("A1:a" & lr).AutoFilter
End With
Next c
Range("f1:f" & flr).ClearContents
Application.ScreenUpdating = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"K" wrote in message
...
Peo;

I have a similar scenario. Also a long list, several repeated values, I
want
to filter unique records. However, I have 4 columns of data! I want to
filter
unique records based on column A, but I want to keep corresponding values
from all 4 columns together. For example:

A B C D
228-45615-91 LUBRICANT, SHMDZ, Grease 25gms.
228-45704-91 Y Y VALVE, SHMDZ, Inlet Check Valve
228-45705-91 Y Y VALVE, SHMDZ, Outlet Check Valve
228-45707-91 Y Y FILTER, SHMDZ, SUCTION FILTER SS
228-45707-91 FILTER, SHMDZ, FOR SOLVENT
228-45708-91 Y Y FILTER, SHMDZ, SUCTION FILTER

I've tried the same method under datafilteradvance filter but I'm having
problems. Your thoughts? Is the a criteria range value i can input to do
this?

thanks



"Peo Sjoblom" wrote:

You can add a header, select the range, do datafilteradvanced filter,
select copy to another location and unique records only

--
Regards,

Peo Sjoblom

(No private emails please)


"jak roodi" <jak
wrote in message
...
I have a very big list contains a lot of repeated values and I want to
get
a
copy of the same list BUT only with unique values. For Example the
column
Reg.No. includes the following Numbers:
1154
1168
1166
1154
908455
907558
1166
908455
1154
1166

List might have thousans of records. I want to get a copy of this list
without repeating any of the numbers included. { Uniqe value list }.

Thanks and regards.

JAK