Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Select rows using a variable


Hey guys I am trying to store a row number into a variable and then use
those variables to select a range. For example:

Rows("x:y").Select

It doesn't allow me to do this, is there another way?


--
jnasr00
------------------------------------------------------------------------
jnasr00's Profile: http://www.excelforum.com/member.php...o&userid=28515
View this thread: http://www.excelforum.com/showthread...hreadid=482118

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Select rows using a variable

try this example

Sub test()
x = 4
y = 7
Range(Rows(x), Rows(y)).Delete
End Sub

--


Gary


"jnasr00" wrote in
message ...

Hey guys I am trying to store a row number into a variable and then use
those variables to select a range. For example:

Rows("x:y").Select

It doesn't allow me to do this, is there another way?


--
jnasr00
------------------------------------------------------------------------
jnasr00's Profile:
http://www.excelforum.com/member.php...o&userid=28515
View this thread: http://www.excelforum.com/showthread...hreadid=482118



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 a variable range Bluecat Excel Worksheet Functions 7 January 13th 09 01:24 AM
select cell by variable name Adam Excel Discussion (Misc queries) 6 May 20th 08 07:54 PM
Use a Variable to select a range Connie Excel Discussion (Misc queries) 3 October 19th 06 05:48 PM
select last 3 rows of variable length coloumn in excel 2003? jay Excel Programming 1 September 4th 05 07:20 PM
Select workbook with variable name. FinChase Excel Programming 1 November 12th 04 07:18 PM


All times are GMT +1. The time now is 07:02 PM.

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"