Yeoman.jeremy
Board Regular
- Joined
- Apr 4, 2011
- Messages
- 90
Hi,
I currently have this:
Basically to say each cell in a range needs to become the value of 2 cells to the left divided by 1 cell to the left.
Whenever I run this code I get an overflow error.
Any ideas?
Thanks
I currently have this:
Code:
Private Sub CalcPUnit_Click()Dim rCell As Range
Dim rRng As Range
Worksheets("Inventory").Select
Set rRng = Range("E3:E50")
For Each rCell In rRng
rCell.Value = rCell.Offset(, 2) / rCell.Offset(, 1)
Next rCell
End Sub
Basically to say each cell in a range needs to become the value of 2 cells to the left divided by 1 cell to the left.
Whenever I run this code I get an overflow error.
Any ideas?
Thanks