Hi there,
Please can someone help me or point me in the right direction.
I'm trying to limit the search routine, below, to only find values from one column,
D for example. At the moment it will find values from the whole sheet.
I need to limit the 'find' because I want to take the routine one stage further.
At present, because of the way it works, I get values I don't want, well would
prefer not to have atleast.
I've tried to limit the find a number of ways but haven't had any success.
Thanks in advance,
Nick
[vba] Sub FindCodesV2()
Dim rng1 As Range
Dim cel1 As Range
Dim counter As Integer
counter = 2
Set rng1 = Worksheets("Sheet1").Range("A2:A57")
For Each cel1 In rng1
cellValue = Cells.find(What:=cel1.Value, After:=cel1, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
Worksheets("Sheet1").Cells(counter, 2).Value = ActiveCell
counter = counter + 1
Next cel1
End Sub
[/vba]