Uniqe Records

  • Thread starter Thread starter Syed Haider Ali
  • Start date Start date
S

Syed Haider Ali

Hi Dears,

Most of the times we have similiar and uniqe records in Col A.

for Example

ColA
Book
Cup
Tea
Book
Pen
Cup

Is there some codes. that if i clik a buttion, the data copy in col
and similiar words will copy only one time i.e similiar words wil
not copy Repeatedly.

For example

Col B
Book
Cup
Pen
Tea


Thanks and Regards

Syed Haider Al
 
Sub Test()
Dim iLastRow As Long
Dim i As Long
Dim j As Long

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To iLastRow
If IsError(Application.Match(Cells(i, "A").Value, Columns(2), 0))
Then
j = j + 1
Cells(j, "B").Value = Cells(i, "A").Value
End If
Next i

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Syed Haider Ali"
 

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

Similar Threads

Copy 2
Tricky Date Calculation 2
Display of Record Set 3
mail merging filtered records..! 0
Advanced transpose/grouping question 7
Macro help required ! 3
Random Sort (Can anybody Handle it) 2
looping required 5

Back
Top