ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   code to select a column down to last poplulated row (https://www.excelbanter.com/excel-programming/307440-code-select-column-down-last-poplulated-row.html)

PaulG

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

P

Tom Ogilvy

code to select a column down to last poplulated row
 
Dim rng as Range, icol as Long
icol = 8
set rng = Range(Cells(1,icol),Cells(rows.count,icol).End(xlu p))
rng.Select

--
Regards,
Tom Ogilvy


"Paulg" wrote in message
...
What is the code to select a column down to the last
populated field?

P




Bob Phillips[_6_]

code to select a column down to last poplulated row
 
Range("A1").Resize(Cells(rows.count,"A").End(xlDow n).Row,1).Select


--

HTH

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

"Paulg" wrote in message
...
What is the code to select a column down to the last
populated field?

P





All times are GMT +1. The time now is 05:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com