Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub Divide()
Dim cLeft As Range
Dim cRight As Range
Dim cAct As Range
Set cAct = ActiveCell
Set cLeft = cAct.Offset(0, -1)
Set cRight = cAct.Offset(0, 1)
If IsNumeric(cRight) And IsNumeric(cLeft) Then
cAct = cRight / cLeft
Else
cAct = "Indivisable"
End If
Set cAct = Nothing
Set cLeft = Nothing
Set cRight = Nothing
End Sub
Function RightDivByLeft(Rng as Range) as Single
Dim nLeft as Single, nRight as Single
nLeft = Rng.Offset(0, -1).Value
nRight = Rng.Offset(0, 1).Value
If nLeft = 0 Then
RightDivByLeft = 0
Else
RightDivByLeft = nRight / nLeft
End If
End Function