Sub
Was()
On
Error
GoTo
errorhandler
Cells(1, 3) = Cells(1, 1) / Cells(1, 2)
On
Error
GoTo
0
On
Error
Resume
Next
Cells(2, 3) = Cells(2, 1) / Cells(2, 2)
If
Err.Number > 0
Then
MsgBox (Err.Number & vbNewLine & Err.Description)
On
Error
GoTo
0
On
Error
GoTo
errorhandler
If
Cells(3, 2) =
""
Then
Err.Raise 11
Cells(3, 3) = Cells(3, 1) / Cells(3, 2)
On
Error
GoTo
0
errorhandler:
If
Err.Number
Then
MsgBox (Err.Number & vbNewLine & Err.Description)
End
Sub