Reputation: 606
Is it possible to do a division with formula in a cell?
I need the formula to be in the cell.
I have tried but not working.
Range("A1").Formula = "="& Range(Cells(4,5),Cells(4,9)).Address(False, False) & ")"
Upvotes: 2
Views: 2215
Reputation:
Something like this?
Sub Main()
Dim lastCol As Long
lastCol = 5
Range("A1").Formula = "=" & Cells(4, lastCol).Address & "/" & Cells(10, lastCol).Address
End Sub
Upvotes: 1