Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Range Reference Problem

I need to convert this range reference to a variable one using "Z" for
only "D4005". "B2" is static and therefore need not be changed.


Dim Z As Integer

Range( "B2:D4005")

I attempted something like this without success:

Range("B2:D & Z & ")


Thank you for your anticipated response.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Range Reference Problem

Hi,

Am Tue, 18 Oct 2011 10:49:37 -0700 (PDT) schrieb sylink:

Range("B2:D & Z & ")


try:
Range("B2:D" & Z)

Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,045
Default Range Reference Problem

On Tue, 18 Oct 2011 10:49:37 -0700 (PDT), sylink wrote:

I need to convert this range reference to a variable one using "Z" for
only "D4005". "B2" is static and therefore need not be changed.


Dim Z As Integer

Range( "B2:D4005")

I attempted something like this without success:

Range("B2:D & Z & ")


Thank you for your anticipated response.


Not tested:

Try: Range("B2","D" & Z)

or

Range("B2:D" & Z)
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Range Reference Problem

On Oct 18, 12:21*pm, Ron Rosenfeld wrote:
On Tue, 18 Oct 2011 10:49:37 -0700 (PDT), sylink wrote:
I need to convert this range reference to a variable one using "Z" for
only "D4005". "B2" is static and therefore need not be changed.


Dim Z As Integer


Range( "B2:D4005")


I attempted something like this without success:


Range("B2:D & Z & ")


Thank you for your anticipated response.


Not tested:

Try: * Range("B2","D" & Z)

or

* * Range("B2:D" & Z)


Try this:
Range(cells(2,2),cells(4,Z))
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
Problem with Range reference - Odd error Kc-Mass Excel Programming 3 December 21st 06 01:05 AM
Range reference problem placing charts Henri Excel Programming 3 April 16th 06 06:34 PM
Reference range in formula problem crapit Excel Programming 4 July 3rd 04 07:26 PM
adding reference-to-range control to excel range Nir Sfez Excel Programming 1 March 2nd 04 06:11 PM


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