Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Newbie in deep..... Excel and VB
Hi everyone.
I'm an experienced programmer, just not experienced with Excel and VB. I have to populate a spread sheet programmatically. On a button click, I am clearing the worksheet, and then I compute a formula that goes into each cell. It doesn't work! This is what I'm doing (snipped somewhat) Dim myFormula as string .... myFormula = "=A1+B1" cells(10, 10).formula = myFormula ..... that works. So does.... cells(10,10).formula = "A1+B1" Now if I need to compute the formula at runtime like this.... Let x=1 Let y=1 myFormula = "=A"+str(x)+"+B"+str(y) and try cells(10, 10).formula = myFormula I get an error. In each case the value of myFormula is "=A1+B1" Anybody ever tried dynamically computing a formula and assigning it to a cell? I've been working on XL for the past week, and have been very impressed with the capabilities, but before I can become a true believer I need to know how to do this... Similarly, how can I dynamically compute a range? I would like to pass a computed string to a statement like this: range(mycomputedstring).formula = myFormula Thanks in advance for your help. Brad Vernon Help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Summing values, x rows deep, depending on a criterion | Excel Worksheet Functions | |||
path too deep | Excel Discussion (Misc queries) | |||
Why can't I have a cell more than 1 line deep? | New Users to Excel | |||
3 deep nested if gets the same value on every cell. | Excel Discussion (Misc queries) | |||
too deep formula line | Excel Discussion (Misc queries) |