Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here are examples of normal VBA with no variables that works:
Range("K20").Select Range("K20").Activate I want to replace the 20 (meaning row 20) with a variable from a named cell. For example, I named cell Z100 as "XRow". XRow now contains the number 7, which can change any time according to formula. I want the VBA to say something like one of the following, but I can't get it to work: Range("KXrow").Select Range("K"Xrow"").Select Range(Cells(K,Xrow)).Select Range(Cells(K,"Xrow")).Select If necessary, I could make do with an unnamed cell, so that it could look something like Range("KZ100").Select Range("K"Z100"").Select Range(Cells(K,Z100)).Select Range(Cells(K,"Z100")).Select Any ideas? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to Select A Cell in VBA with a Variable Row Number? | Excel Programming | |||
select cell by variable name | Excel Discussion (Misc queries) | |||
Select Variable Number of Columns | Excel Programming | |||
Select Cell based on Variable address | Excel Programming |