user1204868
user1204868

Reputation: 606

Division formula

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

Answers (1)

user2140173
user2140173

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

Related Questions