Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
indirect addressing? a range of cells
Is it possible using VBA to store an address string in a cell and then
assign a value to the cell whose address is stored? Or is there a better way to solve this problem? Say I have a series of cells whose names might be ap1,ap2,ap3...ad1,ad2,etc. I would then select the appropriate named cell based on VBA code which first builds the address string ap1 or ad2, etc and uses this string to assign a value (say 600 or 900) to the right cell (ap1 or ad2, etc). Thanks, Randy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
indirect addressing? a range of cells
Hi
do you mean dim rstr as string rstr="ap2" range(rstr).value="Test" -- Regards Frank Kabel Frankfurt, Germany "spindle" schrieb im Newsbeitrag ... Is it possible using VBA to store an address string in a cell and then assign a value to the cell whose address is stored? Or is there a better way to solve this problem? Say I have a series of cells whose names might be ap1,ap2,ap3...ad1,ad2,etc. I would then select the appropriate named cell based on VBA code which first builds the address string ap1 or ad2, etc and uses this string to assign a value (say 600 or 900) to the right cell (ap1 or ad2, etc). Thanks, Randy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
indirect addressing? a range of cells
Here's a note of warning:
Don't use range names like "ad1" or "ap1" since these are actually cells: Range("ad1") is the first cell in Col AD just to the right of range("ac1") and just to the left of range("ae1"). If you try to name Range("B6") for example as "ad1", Excel will get confused. "spindle" wrote: Is it possible using VBA to store an address string in a cell and then assign a value to the cell whose address is stored? Or is there a better way to solve this problem? Say I have a series of cells whose names might be ap1,ap2,ap3...ad1,ad2,etc. I would then select the appropriate named cell based on VBA code which first builds the address string ap1 or ad2, etc and uses this string to assign a value (say 600 or 900) to the right cell (ap1 or ad2, etc). Thanks, Randy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Indirect addressing for linked file | Excel Worksheet Functions | |||
Graphs using indirect addressing | Charts and Charting in Excel | |||
Indirect Addressing in VBA | Excel Discussion (Misc queries) | |||
Indirect Addressing | Excel Discussion (Misc queries) | |||
Indirect addressing | Excel Programming |