Reputation: 1
I have this solution, but i would like to print a formula for it.
Sub Minus()
ActiveCell = ActiveCell - ActiveCell.Offset(0, -1)
End Sub
This code returns only correct value, but i would like full original value minus adjacent cell.
Thanks!
Upvotes: 0
Views: 734
Reputation: 27249
Sub Minus()
With ActiveCell
.Formula = "=" & .Value & "-" & .Offset(0, -1).Value
End With
End Sub
Upvotes: 4