Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default Help with Range Reference

I have the variable ColLetter as a string, and I want to refernce a range in
code

Say ColLetter is equal to B

Instead of doing Range(B5:B55) I want to do

Range(ColLetter&5:ColLetter&55)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Help with Range Reference

Range(ColLetter & "5:" & ColLetter & "55")

--
Kind regards,

Niek Otten

"Mike" wrote in message ...
|I have the variable ColLetter as a string, and I want to refernce a range in
| code
|
| Say ColLetter is equal to B
|
| Instead of doing Range(B5:B55) I want to do
|
| Range(ColLetter&5:ColLetter&55)
|
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Help with Range Reference

Or

range(colLetter & "5").resize(51,1)
or
cells(5,colLetter).resize(51,1)

..resize(x,y) says to resize the range so that it ends up as x rows and y
columns.

Mike wrote:

I have the variable ColLetter as a string, and I want to refernce a range in
code

Say ColLetter is equal to B

Instead of doing Range(B5:B55) I want to do

Range(ColLetter&5:ColLetter&55)


--

Dave Peterson
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
automatic range - named range give me circular reference... George Thorogood Excel Discussion (Misc queries) 0 February 22nd 07 07:53 PM
Can you get the range reference for each page in a worksheet print range? Crosby Excel Programming 3 April 12th 05 06:06 PM
adding reference-to-range control to excel range Nir Sfez Excel Programming 1 March 2nd 04 06:11 PM
Range Reference Murray Taylor[_5_] Excel Programming 4 January 26th 04 09:47 AM
Subscript out of Range on Range reference Tom Ogilvy Excel Programming 0 September 13th 03 03:38 PM


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