LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to use variables to define range


I have been digging through this forum for the last day or so in hopes
of finding a solution so as not to repeat a question, but have been
unsuccessful.

I am trying to define a range via variables with (row,column) format
instead of explicitly naming the range.

i.e.- set myrange =
worksheets("sheet1").range(row1,column1:row2,colum n2)
where row1, row2, column1, column2 are variables

instead of set myrange = worksheets("sheet1").range("a1:b2")

I can't seem to get the syntax correct, and I cannot figure out what I
am missing.
I can name it explicitly without a problem, but my range changes
constantly and I don't want to have to change the code everytime. Any
help would be greatly appreciated.

Thanks in advance.

Drew


--
Dolemite
------------------------------------------------------------------------
Dolemite's Profile: http://www.excelforum.com/member.php...o&userid=26136
View this thread: http://www.excelforum.com/showthread...hreadid=395323

 
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
Define a range jlclyde Excel Discussion (Misc queries) 2 April 17th 08 08:26 PM
How do you define variables in excel? BigRon Excel Discussion (Misc queries) 6 April 16th 05 08:47 PM
Define a range based on another named range Basil Excel Worksheet Functions 2 February 21st 05 01:47 PM
Define Range Name Wayne Huxman Excel Programming 3 November 21st 04 09:56 PM
Could we define series variables in one statement? Together[_7_] Excel Programming 1 March 1st 04 07:04 AM


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