code to select a column down to last poplulated row

  • Thread starter Thread starter Paulg
  • Start date Start date
P

Paulg

What is the code to select a column down to the last
populated field?

P
 
Dim rng as Range, icol as Long
icol = 8
set rng = Range(Cells(1,icol),Cells(rows.count,icol).End(xlup))
rng.Select
 
Range("A1").Resize(Cells(rows.count,"A").End(xlDown).Row,1).Select


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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

Back
Top