programsam
Board Regular
- Joined
- Feb 10, 2016
- Messages
- 123
Using this code to parse through values 'snumber' in a column and return another value. The issue is that it is not returning the first two values every time the list is updated. What am I missing?
VBA Code:
With ws
'lastrow = ws.Range("F").End(xlUp).Row
lastrow = ws.Cells(Rows.Count, "C").End(xlUp).Row
With ws.Range("C1:C" & lastrow)
Set c = .Find(snumber, LookIn:=xlValues, Lookat:=xlWhole)
'If Not c Is Nothing Then
If c.Count < 8 Then
FirstAddress = c.Address
Do
Worksheets("SD-LS").Range("F" & DestLR).Offset(30, 0) = c.Offset(0, 4)
DestLR = DestLR + 1
Set c = .FindNext(c)
'Loop While Not c Is Nothing And c.Address <> FirstAddress
Loop While DestLR <= 8 And c.Address <> FirstAddress
End If
End With
End With