Hi cmccabe,
try
Private Sub CommandButton1_Click()
Dim lRow As Long, myArray, x As Long
lRow = Cells(Rows.Count, 2).End(xlUp).Row
If lRow = 1 Then Exit Sub
myArray = Range("B1:B" & lRow).Value
For x = 2 To UBound(myArray)
If myArray(x, 1) > 100 Then
Cells(x, "C") = myArray(x, 1) / 10
If Cells(x, "C") = 0 Then Cells(x, "D") = 0 Else Cells(x, "D") = (myArray(x, 1) / 2) / Cells(x, "C")
Cells(x, "E") = (myArray(x, 1) / 2) - Cells(x, "D")
Else
Cells(x, "C") = myArray(x, 1) / 10
If Cells(x, "C") = 0 Then Cells(x, "D") = 0 Else Cells(x, "D") = myArray(x, 1) / Cells(x, "C")
Cells(x, "E") = myArray(x, 1) - Cells(x, "D")
End If
Next
End Sub
Bookmarks