Using the code below, I am trying to select the next cell down from the header so I can select just the data in the column without the header.
What on earth am I doing wrong??
Never mind! I am so sorry but I found the answer (Offset property). I will work on not being so quick to post -- do research BEFORE posting a question!!
Thank you,
CWMacNut
Graphics Engineer
Code:
For i = 1 To HeaderCount
If HeaderNames(i) = "ZZZ" Then
' MsgBox ("Column # is: " & i) ' [B][COLOR=#008000]<===== answers correctly[/COLOR][/B]
Cells(i & ",2").Select ' [COLOR=#008000][B]<===== Selects cell (L1)!!! i does not equal 12!![/B][/COLOR]
Range(Selection, Selection.End(xlDown)).Select
' Selection.Copy
Exit For
End If
Next
What on earth am I doing wrong??
Never mind! I am so sorry but I found the answer (Offset property). I will work on not being so quick to post -- do research BEFORE posting a question!!
Thank you,
CWMacNut
Graphics Engineer
Last edited: