Range Reference Problem

S

sylink

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.
 
R

Ron Rosenfeld

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top