envisioning
New Member
- Joined
- May 2, 2011
- Messages
- 13
Hello,
I have been trying to figure this out on my own, but can't seem to get it right.
I have a few ranges. Example:
Div Range1 as Range, Range2 as Range, Range3 as Range
Range1 = A1
Range2 = D1
Range3 = G1
I want G1 = A1/D1 (G1 is equal to A1 divided by D1)
However, I want to do it with VBA using the three references. Also, I don't just want the number (the quotient answer), I need the formula in the cell so that it can be used to autofill.
I tried: Range3.Range("A1").FormulaR1C1 = Range1 / Range2
but this does not work and forms an error.
I need the cell to contain the formula (A1/D1) but by using the ranges. I am doing this so I can auto-fill this formula down a column (by a macro).
Any help on this is greatly appreciated!
Thanks!
Just a note:
I know how to do this by hand, I simplified the problem to make the answer easier. Range1 and Range2 will not always be the same cell (it's a rolling average spreadsheet.
Thanks again!
I have been trying to figure this out on my own, but can't seem to get it right.
I have a few ranges. Example:
Div Range1 as Range, Range2 as Range, Range3 as Range
Range1 = A1
Range2 = D1
Range3 = G1
I want G1 = A1/D1 (G1 is equal to A1 divided by D1)
However, I want to do it with VBA using the three references. Also, I don't just want the number (the quotient answer), I need the formula in the cell so that it can be used to autofill.
I tried: Range3.Range("A1").FormulaR1C1 = Range1 / Range2
but this does not work and forms an error.
I need the cell to contain the formula (A1/D1) but by using the ranges. I am doing this so I can auto-fill this formula down a column (by a macro).
Any help on this is greatly appreciated!
Thanks!
Just a note:
I know how to do this by hand, I simplified the problem to make the answer easier. Range1 and Range2 will not always be the same cell (it's a rolling average spreadsheet.
Thanks again!