Hi.. i have this code . my plan if i have value of x = 10,50 then it will round down into value x = 10, but if x = 10,51 then it will round up into x=11
so can anyone help me?
this is my code :
Function RoundPriceSPN(varNilai As Double) As Double
Dim x As Double
If varNilai <= 0.5 Then
RoundPriceSPN = RoundD(varNilai)
Else
If varNilai > 0.5 Then
RoundPriceSPN = RoundU(varNilai)
End If
End If
RoundD is from roundDown function in excel and RoundU is from roundUp function in excel too...
Thx
so can anyone help me?
this is my code :
Function RoundPriceSPN(varNilai As Double) As Double
Dim x As Double
If varNilai <= 0.5 Then
RoundPriceSPN = RoundD(varNilai)
Else
If varNilai > 0.5 Then
RoundPriceSPN = RoundU(varNilai)
End If
End If
RoundD is from roundDown function in excel and RoundU is from roundUp function in excel too...
Thx