#1   Report Post  
Coolboy55
 
Posts: n/a
Default Selecting Rows


I want to select rows 3 to l_LastRow. I can't say Rows("3:l_LastRow"),
so what are my alternatives? Thanks!

This is what I have:

----------
l_LastRow = Sheet4.Cells.Find(What:=" * ", After:=[A1],
SearchDirection:=xlPrevious).Row

Sheet4.Rows("3:l_LastRow").Select
----------


--
Coolboy55
------------------------------------------------------------------------
Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
View this thread: http://www.excelforum.com/showthread...hreadid=397766

  #2   Report Post  
hideki
 
Posts: n/a
Default


Did you mean want to select a row three row after the last row?

Sheets("Sheet4").Rows(lngLastRow + 3).Select


--
hideki
------------------------------------------------------------------------
hideki's Profile: http://www.excelforum.com/member.php...o&userid=18903
View this thread: http://www.excelforum.com/showthread...hreadid=397766

  #3   Report Post  
Coolboy55
 
Posts: n/a
Default


I want to select rows 3 to lngLastRow (in this case, lngLastRow = 203).
But the value of lngLastRow may change in the future as items in the
table I'm creating are modified.


--
Coolboy55
------------------------------------------------------------------------
Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
View this thread: http://www.excelforum.com/showthread...hreadid=397766

  #4   Report Post  
Coolboy55
 
Posts: n/a
Default


I also will want to use xlLastCell to pick a range, as in,
Range("B3:xlLastCell"). How can I do that?

I'm basically creating a table for my data, along with background
shading. The data in the table will change occasionally, so the
borders and shading will need to be reapplied and resized as
necessary.

Am I doing it wrong?


--
Coolboy55
------------------------------------------------------------------------
Coolboy55's Profile: http://www.excelforum.com/member.php...o&userid=26508
View this thread: http://www.excelforum.com/showthread...hreadid=397766

  #5   Report Post  
hideki
 
Posts: n/a
Default


So you want to select the range from B3 to the last cell? I think you
can try this syntax.

Range(Cells(3, "B"), Cells.SpecialCells(xlCellTypeLastCell)).Select


--
hideki
------------------------------------------------------------------------
hideki's Profile: http://www.excelforum.com/member.php...o&userid=18903
View this thread: http://www.excelforum.com/showthread...hreadid=397766

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
formula to use when number of rows changes dynamically confused Excel Worksheet Functions 3 August 17th 05 03:55 PM
Selecting rows from cells sakk555 Excel Discussion (Misc queries) 4 June 5th 05 12:21 AM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM
Selecting a large number of rows, but not all Katherine New Users to Excel 4 January 27th 05 11:54 PM
Adding Rows to Master Sheet Excel Newbie New Users to Excel 1 December 23rd 04 10:56 PM


All times are GMT +1. The time now is 12:46 AM.

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

About Us

"It's about Microsoft Excel"