I have Worksheet with headers and data.
Header (1st row):
2st and following rows contants various date.
What I need: find certain string in header's row and get column number.
Yes, of course, I can make loop for examine each column in first row:
Function getFieldColumn(s As Worksheet, ByVal sName As String) As Integer
Dim iCol As Integer
iCol = 1
While s.Cells(1, iCol) <> ""
If UCase(s.Cells(1, iCol)) = UCase(sName) Then
getFieldColumn = iCol
iCol = iCol + 1
... but maybe there is better (more intelligent and elegant) way?