Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
how can I us a variable as a cell location? ie
Range("c5:variable").Select |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Brad,
Not sure if I understand you (and let me know if this is not what you were asking), but all you need to do to use a variable as the parameter for the Range object: Dim sCell As String sCell = "c5" Range(sCell).Select -- Charles www.officezealot.com "Brad" wrote in message ... how can I us a variable as a cell location? ie Range("c5:variable").Select |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use this Brad
Var = 10 Range("c5:c" & Var).Select or Var = "C10" Range("c5:" & Var).Select -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Brad" wrote in message ... how can I us a variable as a cell location? ie Range("c5:variable").Select |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
AH! Now I see what the OPS meant.
-- Kind Regards, Niek Otten Microsoft MVP - Excel "Ron de Bruin" wrote in message ... You can use this Brad Var = 10 Range("c5:c" & Var).Select or Var = "C10" Range("c5:" & Var).Select -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Brad" wrote in message ... how can I us a variable as a cell location? ie Range("c5:variable").Select |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range(C5).Select
-- Kind Regards, Niek Otten Microsoft MVP - Excel "Brad" wrote in message ... how can I us a variable as a cell location? ie Range("c5:variable").Select |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Brad,
It depends on what the variable contains. If it is a string variable with an address, you can use something like Range("C5:" & Var).Select -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Brad" wrote in message ... how can I us a variable as a cell location? ie Range("c5:variable").Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using a variable to point to a location | Excel Worksheet Functions | |||
how to set up a simple variable in Excel, but cell location independent | New Users to Excel | |||
how to set up a simple variable in Excel, but cell location independent | Excel Worksheet Functions | |||
Set a range from a variable location | Excel Discussion (Misc queries) | |||
join location string with variable | Excel Programming |