decadence
Well-known Member
- Joined
- Oct 9, 2015
- Messages
- 525
- Office Version
- 365
- 2016
- 2013
- 2010
- 2007
- Platform
- Windows
HI, I am trying to loop through an array of words, It loops through but doesn't do anything, I know I am probably forgetting something, See code
Code:
Dim Rng As range, c As Long, Arr As Variant, I As Integer
'
Arr = Array("IPN", "VPN", "PartNumber", "Part")
For i = LBound(Arr, 1) To UBound(Arr, 1)
Set Fnd = Cells.Find(Arr(c), range("A1"), xlValues, xlWhole, xlByRows, xlNext, False, False)
If Not Fnd Is Nothing Then
Set Rng = range(Fnd.Offset(1), Cells(Rows.Count, Fnd.Column).End(xlUp))
End If
Next i
If Fnd Is Nothing Then Exit Sub
Rng.Select
End Sub
Last edited: