G
Guest
Can anybody just give a clue how to transfere information from VBA to a
formula? Let's say:
If I in a Sub have
A = 4
B = 8
How can I use that figures in a formula in let's say cell A1?
Application.Range("A1").Formula = "=4+8"
I tried .Formula= "=A+B" but of course, it doesn't work since it's an
compleatly other "environment".
One way is to use .Value = A in one cell, .Value = B in an other and let the
formula in the third cell to point to that pair of cells and the hide the
other two, but that isn't god enought.
How should I do?
/regards
formula? Let's say:
If I in a Sub have
A = 4
B = 8
How can I use that figures in a formula in let's say cell A1?
Application.Range("A1").Formula = "=4+8"
I tried .Formula= "=A+B" but of course, it doesn't work since it's an
compleatly other "environment".
One way is to use .Value = A in one cell, .Value = B in an other and let the
formula in the third cell to point to that pair of cells and the hide the
other two, but that isn't god enought.
How should I do?
/regards