Excel VBA select range using cells and xlDown
<p>I am looping through a range in column A to find a heading, once found I need to select the next cell down to the last used cell. </p>

<p>Can't for the life of me select this range using Cells and End(xlDown)</p>

<pre><code>For k = 1 To lastCell
    If Cells(k, 1).Value = rangeName Then
        Range(Range(Cells(k + 1, 1)), Range(Cells(k + 1, 1)).End(xlDown)).Select
    End If
Next k
</code></pre>

<p>I have tried <code>Range(Cells(k + 1, 1), Cells(k + 1, 1).End(xlDown))</code>, but no combination will work.</p>

<p>There are blank cells in column A, an example of the data is as so:</p>

<pre><code>MONTH
Jan
Feb

AGE
18-21
22+

GENDER
Male
Female
Horse
</code></pre>

<p>How would I go about selecting this range, if <code>rangeName</code> was to equal <code>GENDER</code> for example.</p>