Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting a row with a variable ?

How do I select an entire row by using a variable to store the row
number ? I currently have a statement which selects a range :

Range(Cells(Count, 1), Cells(Count, 16)).Select

but I'd like to select the entire row (row number is Count) instead...

Any ideas ?

Thanks,

Blewyn


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Selecting a row with a variable ?

Range(Cells(Count, 1), Cells(Count, 16)).Entirerow.Select

or even

Cells(Count, 1).EntireRow.Select

--

HTH

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

"Blewyn " wrote in message
...
How do I select an entire row by using a variable to store the row
number ? I currently have a statement which selects a range :

Range(Cells(Count, 1), Cells(Count, 16)).Select

but I'd like to select the entire row (row number is Count) instead...

Any ideas ?

Thanks,

Blewyn


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Selecting a row with a variable ?

I think you're looking for EntireRow
eg.
Cells(Count, 1).EntireRow.Select

But a quicker way:
Rows(Count).Select

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Blewyn " wrote in message
...
How do I select an entire row by using a variable to store the row
number ? I currently have a statement which selects a range :

Range(Cells(Count, 1), Cells(Count, 16)).Select

but I'd like to select the entire row (row number is Count) instead...

Any ideas ?

Thanks,

Blewyn


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Selecting a row with a variable ?

Great, thanks

--
Message posted from http://www.ExcelForum.com

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
Selecting a variable print area in a macro Surrealest Excel Discussion (Misc queries) 2 June 7th 09 07:08 AM
Selecting Variable Data Ranges rc Excel Discussion (Misc queries) 2 May 18th 07 08:26 PM
Selecting Variable Row Range w/Macro steve Excel Programming 3 February 26th 04 07:24 PM
Selecting rows with variable Jim[_24_] Excel Programming 7 September 16th 03 02:03 PM
Selecting a Range Using a Variable Bob J. Excel Programming 4 September 14th 03 09:24 PM


All times are GMT +1. The time now is 03:28 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"