Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Select through last non blank row in a column

I am trying to get a range from b18 down to the last cell in the column - I thought this would do it based on my recording of a macro but I end up with b1:b65535 - any suggestions

Range("B18", "B65535").Selec
Range(selection, selection.End(xlUp)).Selec

Also I presume I can prefix the ranges with a worksheets object correct

May the worksheet be hidden during the selection

Thanks as usual.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Select through last non blank row in a column

ERic,

Try

Range("B18",Cells(Rows.Count,"B").End(xlUp)).Selec t

--

HTH

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

"eric" wrote in message
...
I am trying to get a range from b18 down to the last cell in the column -

I thought this would do it based on my recording of a macro but I end up
with b1:b65535 - any suggestions?


Range("B18", "B65535").Select
Range(selection, selection.End(xlUp)).Select


Also I presume I can prefix the ranges with a worksheets object correct?

May the worksheet be hidden during the selection?

Thanks as usual.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
select all non-blank cells johncaleb Excel Discussion (Misc queries) 3 May 7th 10 05:40 AM
VBA: Column Select then Data Select then return to cell A1 James C[_2_] Excel Discussion (Misc queries) 3 February 1st 10 11:35 AM
Select until blank row Bonnie Excel Discussion (Misc queries) 8 July 21st 08 08:41 PM
I want to select the first blank cell in column A Greegan Excel Worksheet Functions 7 March 13th 05 12:56 PM
Select blank cell Hodar Excel Programming 6 January 21st 04 02:18 PM


All times are GMT +1. The time now is 01:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"