you could use the Match formula to report existing and location of fieldname
![]()
Public Function GetFieldPosition(Name As String, FieldNames As Range) As Long On Error Resume Next GetFieldPosition = Application.WorksheetFunction.Match(Name, FieldNames, 0) Exit Function End Function Sub x() Dim lngFieldCol As Long lngFieldCol = GetFieldPosition("Customer PO", Range("A1:O1")) If lngFieldCol = 0 Then ' Does not exist Else ' check position End If End Sub
Bookmarks