Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to select the following range:
Range("BW2:CF2").Select However, I want to be able to change the 2 to a different number programmatically using i as the variable. I've tried Range("BW"&i ":CF"&i).Select and it just doesn't work. What am I doing wrong? Thanks, Barb Reinhardt |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Barb
close ... try: Range("BW" & i & ":CF" & i).Select or Range(Cells(i, "BW"), Cells(i, "CF")).Select Regards Trevor "Barb Reinhardt" wrote in message ... I want to select the following range: Range("BW2:CF2").Select However, I want to be able to change the 2 to a different number programmatically using i as the variable. I've tried Range("BW"&i ":CF"&i).Select and it just doesn't work. What am I doing wrong? Thanks, Barb Reinhardt |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are missing one "&"
Range("BW" & i & ":CF" & i).Select -- HTH... Jim Thomlinson "Barb Reinhardt" wrote: I want to select the following range: Range("BW2:CF2").Select However, I want to be able to change the 2 to a different number programmatically using i as the variable. I've tried Range("BW"&i ":CF"&i).Select and it just doesn't work. What am I doing wrong? Thanks, Barb Reinhardt |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I looked and looked for that. Don't ask me why I missed it.
Thanks! I knew someone here would find it quickly. "Jim Thomlinson" wrote: You are missing one "&" Range("BW" & i & ":CF" & i).Select -- HTH... Jim Thomlinson "Barb Reinhardt" wrote: I want to select the following range: Range("BW2:CF2").Select However, I want to be able to change the 2 to a different number programmatically using i as the variable. I've tried Range("BW"&i ":CF"&i).Select and it just doesn't work. What am I doing wrong? Thanks, Barb Reinhardt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting ranges | Excel Programming | |||
Selecting ranges with a text box | Excel Programming | |||
Selecting ranges with a text box | Excel Programming | |||
Selecting Named Ranges | Excel Programming | |||
selecting ranges | Excel Programming |