Hi all,
is there any way to get unique records from a specific column in Ms excel by formula or VBA.
i need to check unique records from specefic column and based on that criteria i want to paste all data from master sheet to other sheet.
i have written a code to do the this but it works on static definition
i want to change it dynamic
sub uniquerecords()
Dim ClientName(), i As Integer
ClientName() = Array("Abc", "def", "GHI", "JKL")
For i = 0 To UBound(ClientName)
Sheets("sheet1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=2, Criteria1:=ClientName(i)
Cells.Copy
Sheets.Add
ActiveSheet.Paste
ActiveSheet.Name = ClientName(i)
Sheets("sheet1").Select
Next i
end sub
how can i change it to dynamic...............
is there any way to get unique records from a specific column in Ms excel by formula or VBA.
i need to check unique records from specefic column and based on that criteria i want to paste all data from master sheet to other sheet.
i have written a code to do the this but it works on static definition
i want to change it dynamic
sub uniquerecords()
Dim ClientName(), i As Integer
ClientName() = Array("Abc", "def", "GHI", "JKL")
For i = 0 To UBound(ClientName)
Sheets("sheet1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=2, Criteria1:=ClientName(i)
Cells.Copy
Sheets.Add
ActiveSheet.Paste
ActiveSheet.Name = ClientName(i)
Sheets("sheet1").Select
Next i
end sub
how can i change it to dynamic...............