select a certain range of data

S

Scott

I need to write a code that is able to start at cell A6 then find the last
column with data then find the first blank row and set that as my range and
then have that range selected. So, as an example from below, the code would
select A6:C8 and leave out the cells below the blank row.

A B C
6 text-1 text-1 text-1
7 text-2 text-2 text-2
8 text-3 text-3 text-3
9
10 Total xxx

Thank You in advance
 
M

Mike H

Scott,

You can do it like this but be aware it is highly unlikely you would need to
select the range to do whatever it is you want to do next

LastRow = Range("A6").End(xlDown).Row
Range("A6:A" & LastRow).Resize(, 3).Select
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top