That looks fair enough but if the number is is 3.00 then it rounds to 10
I have a string manip func that works but it is messy.
::
a = 435.00
b = 433.00
a= cstr(formatnumber(a))
b= cstr(formatnumber(b))
function roundUp(cost)
if formatnumber(right(cost, 4)) <> 0 then
if formatnumber(right(cost, 4)) < 5 then
cost = cstr(left(cost, (len(cost)-4))) & "5.00"
cost = cdbl(cost)
response.write "RoundUP = " & formatnumber(cost) & "<br>"
elseif formatnumber(right(cost, 4)) > 5 then
if len(cost) > 5 then
cost = cstr(left(cost, (len(cost)-5))) & (mid(cost, (len(cost)-4), 1)+1) & "0.00"
response.write "RoundUP = " & formatnumber(cost) & "<br>"
elseif len(cost) <= 5 then
cost = (mid(cost, (len(cost)-4), 1)+1) & "0.00"
response.write "RoundUP = " & formatnumber(cost) & "<br>"
end if
end if
end if
roundUp=cost
end function
c=roundUp(a)
d=roundUp(b)
response.write "<br>" & c & "<br>" & d