Hi,
I have tried to modify the delete duplicate code to segregate/display code. the problem is, once a first loop is over it isn't returning as required.
inputs used
[TABLE="width: 64"]
[TD="width: 64"]aa[/TD]
mu
[/td]aa
[/td]gf
[/td]gh
[/td]ac
[/td]uy
[/td]ad
[/td]re
[/td]aa
[/td]mu
output: aa aa
[/td]
[/TABLE]
Code
Sub DelDups_OneList()
Dim iListCount As Integer
Dim iCtr As Integer
Dim te As Integer
Dim aa As Integer
Application.ScreenUpdating = False
iListCount = Sheets("Sheet1").Range("A1:A15").Rows.Count
te = 4
aa = 1
Sheets("Sheet1").Range("A1").Select
Do Until ActiveCell = ""
For iCtr = 1 To iListCount
If ActiveCell.Row <> Sheets("Sheet1").Cells(iCtr, 1).Row Then
If ActiveCell.Value = Sheets("Sheet1").Cells(iCtr, 1).Value Then
Sheets("Sheet1").Cells(iCtr, 1).Copy
Sheets("Sheet1").Cells(1, te).Select
ActiveSheet.Paste
te = te + 1
End If
End If
Next iCtr
aa = aa + 1
ActiveCell.Cells(aa, 1).Select
Loop
Application.ScreenUpdating = True
End Sub
Display More
Thanks and regards,
prabhu.C