XLA Routines: EE_PositionInRange

Nick's picture
Function EE_PositionInRange(Header As String, rng As Range) As Long
'http://excelexperts.com/xla-routines-eePositionInRange    for updates on this function
' Takes a heading name, range
' returns the position in the range as long
' returns 0 if not found
    On Error Resume Next
    EE_PositionInRange = Application.WorksheetFunction.Match(Header, rng, 0)
    If Err.Number <> 0 Then
        EE_PositionInRange = 0
    End If
 
End Function