i have data in my sheet with duplicates in Col A Col B Col C Col D Col E i want to copy only unique values data from sheet1 to sheet2 has per same columns
Sub uniKue()
Dim i As Long, N As Long, s As String
N = Cells(Rows.count, "A").End(xlUp).Row
For i = 2 To N
Cells(i, 6) = Cells(i, 1) & " " & Cells(i, 2) & " " & Cells(i, 3) & " " & Cells(i, 4) & " " & Cells(i, 5)
Next i
Range("F2:F" & N).RemoveDuplicates Columns:=1, Header:=xlNo
End Sub
--------------------------------------------------------------------------------------------------------------------
i have found some vba code this code is working perfectly to me i have some small problem this below code is copying unique value data to Column F & my question is this code will copy unique data to sheet2 of Col A to Col E
--------------------------------------------------------------------------------------------------------------------Sub uniKue()
Dim i As Long, N As Long, s As String
N = Cells(Rows.count, "A").End(xlUp).Row
For i = 2 To N
Cells(i, 6) = Cells(i, 1) & " " & Cells(i, 2) & " " & Cells(i, 3) & " " & Cells(i, 4) & " " & Cells(i, 5)
Next i
Range("F2:F" & N).RemoveDuplicates Columns:=1, Header:=xlNo
End Sub
--------------------------------------------------------------------------------------------------------------------