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: 905
Default How to reference variable rectangular range?

I have the following variables:

Const cellName As String = "B2"
Const nRow As Long = 5
Const nCol As Long = 10

I want to reference the rectangular range starting from cellName through row
cellName+nRow and column cellName+nCol; that is, B2:K7 for the values above.

I've come up with the following:

Range(cellName, Range(cellName).Cells(nRow, nCol))

Seems tedious. Is that the best I can do?

 
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
How to reference variable range? WhatsUp31415 Excel Discussion (Misc queries) 4 May 17th 09 07:20 PM
Making a vertical list from a rectangular range, with no empty lines vsoler Excel Worksheet Functions 10 February 25th 09 03:55 AM
Where is the link? (non-rectangular reference) Michael R Excel Discussion (Misc queries) 4 May 28th 08 10:41 AM
Variable range reference Kyle Szukaitis Excel Discussion (Misc queries) 1 October 21st 05 03:10 AM
Variable Range Reference Bob Excel Programming 3 December 16th 04 04:13 PM


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