To be sure if i have understand...
is this code correct to calculate the 3% of this operation:
.....
'PERCENTUALE SUPERO MONETE
If strDBRows(4, I) > 0 And strDBRows(3, I) > 0 Then
MONETE = Empty
MONETE = (CLng(strDBRows(3, I) - CLng(strDBRows(4, I))) * 0.03)
End If
'PERCENTUALE SUPERO MONETE
.....
note:
strDBRows, is a prt of loop of array
calculate percentage
-
- Administrator
- Posts: 78534
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: calculate percentage
The line
MONETE = Empty
isn't necessary, you can delete it. The parentheses in the next line aren't quite right, as far as I can tell. It should be
MONETE = (CLng(strDBRows(3, I)) - CLng(strDBRows(4, I))) * 0.03
if you want to calculate 3% of the difference.
MONETE = Empty
isn't necessary, you can delete it. The parentheses in the next line aren't quite right, as far as I can tell. It should be
MONETE = (CLng(strDBRows(3, I)) - CLng(strDBRows(4, I))) * 0.03
if you want to calculate 3% of the difference.
Best wishes,
Hans
Hans