austenr
06-21-2005, 06:57 AM
When I run the code below it rounds up to the next dollar. I forget what you have to do to make it exact. Ex. 1621.89 instead of 1622.
Sub payout()
Dim bval As Long
Dim myrange As Variant
For Each myrange In Range("b6:b16")
If myrange <> "" Then
bval = myrange.Value + bval
End If
Next myrange
MsgBox "total is " & bval
End Sub
:banghead:
Sub payout()
Dim bval As Long
Dim myrange As Variant
For Each myrange In Range("b6:b16")
If myrange <> "" Then
bval = myrange.Value + bval
End If
Next myrange
MsgBox "total is " & bval
End Sub
:banghead: