Quantcast
Channel: Tech Support Guy
Viewing all articles
Browse latest Browse all 38405

Loop find match and process data on row

$
0
0
I found this excellent code that goes through a list real fast and finds every occurence of search paramaeter, eg 114,

but when it finds a match it goes to the column/row match is in. So anything
that needs to be adjusted to the left of found data has to be a minus col count.
Any way for this code to find row number as well?

odn = 114

Dim R As Range, FindAddress As String
With Sheets("NEWQUICK").Range("ap106:ap50000")
Set R = .Find(odn) ', LookAt:=xlWhole
If Not R Is Nothing Then
FindAddress = R.Address
Do
R.Cells(1, -13) = "to the left of cell that has 114"

R.Cells(1, 5) = "To the right of found cell on row"

Set R = .FindNext(R)
Loop While Not R Is Nothing And R.Address <> FindAddress
End If
End With

Set R = Nothing

Viewing all articles
Browse latest Browse all 38405

Trending Articles