K
ksnapp
here is the code
Function step1(Names As Range, Name As String)
Dim C As Single ' counter
Dim N As Single ' number of rows from top
For Each cell In Names
If cell.Value = Name Then
Range("a1", cell).Select
N = Selection.Rows.Count
End If
Next
step1 = N
End Function
it just returns 1 if the value for Name is in the range Names
regardless of the position of the name in the range. If the value fo
name is not in the list it returns 0.
What im trying to do is get the number of the row that the speicifie
value for name occours in Names, or from the top either way will work
Function step1(Names As Range, Name As String)
Dim C As Single ' counter
Dim N As Single ' number of rows from top
For Each cell In Names
If cell.Value = Name Then
Range("a1", cell).Select
N = Selection.Rows.Count
End If
Next
step1 = N
End Function
it just returns 1 if the value for Name is in the range Names
regardless of the position of the name in the range. If the value fo
name is not in the list it returns 0.
What im trying to do is get the number of the row that the speicifie
value for name occours in Names, or from the top either way will work