Hi everyone,
I've got a named range (IL_FileName) and I want to loop through each cell within that range to match up the value in a UserForm control. Here's my code, but it doesn't work?
Dim wsISV As Worksheet
Dim rCell As Range
Set wsISV = Worksheets("I_SELECTED_VESSEL")
For Each rCell In wsISV.Range("IL_FileName")
If Cell.Value = Me.I_SelectVessel_L.Value Then
Cell.Offset(0, -2).Value = "Selected"
GoTo ContinueProcedure
End If
Next rCell
ContinueProcedure:
wsISV.Calculate
This makes perfect sense to me but it errors on the "For Each rCell..." line. I know it happens on "IL_FileName" because when I replace that with the actual range it works fine.
IL_FileName formulas is below. It's a "dynamic" range and automatically adjusts based on what data is in the column:
=OFFSET(IMPORTED_LIST!$C$2,0,0,COUNTA(IMPORTED_LIST!$C:$C)-1,1)
Any help would be appreciated.
Many thanks,
Daniel