Hello everyone,

I'm stumbled on a bit of a problem, I'm testing a row/range on sheet to determine if one of the cells contains a string I'm looking for.

The code is as follows:
For j = 1 To Cells(1, 1).End(xlDown).Row 'to loop through every row in the worksheet
    Select Case Range(Cells(j, 1), Cells(j, Cells(j, 1).End(xlToRight).Column)).Text 'selects the entire row
            Case "Date" 'looks in each cell for the following string
                HeaderRow = j 'if case is true then the header row has been identified
                Exit For
    End Select
Next j
Apologies for the messy Range statement, the number of populated columns on each row is dynamic.
When running the code it just skips past the row that contains a cell with the appropriate string.

Is this approach possible with tweaking? Or will I have to code to manually test each cell in sequence?

Thanks for your time.

Adam