setting cells with formulas

R

Russ

This is really trivial but I can't seem to find the answer
I want to copy a formula from a cell in a column down to other cells in the
same column with a simple routine. A sample of which is below

Public Sub test_case()
Dim r As Long
With ActiveWorkbook.Sheets(1)
For r = 2 To 5
.Cells(r, 1).Formula = .Cells(1, 1)
Next
End With
End Sub

In cell(1,1) is a sample formula =RC2/RC3
I would like this formula to appear in the four cells below it. Running
this routine, Excel shows =RC2/RC3 in the cells but it is not a formula. I
have tried various things but nothing seems to work. Any help would be
greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top