I am creating a shipping cost application and need to round the weight up, never down. This seems like a dumb question but I haven't found any references that answer it.<BR>Thanks in advance,<BR>Carson
By 'round up', I have to assume that you mean round up to the nearest whole unit (integer). I also assume with weights that you only do this for positive numbers. Is this correct? <BR><BR>If so, assuming that 'a' is the value you want to always round up...<BR><BR> b = int(a+(abs(fix(a)<>a)))<BR><BR><BR>you might also do this:<BR><BR> b = cint(a + .5)<BR><BR><BR>Hope this helps!
I would suggest you aviod using the cint example because if the number happens to be an exact number. eg: 2.0 or somthing, the cint of the result (2.5) is 3.<BR>Use the top example it is more exact.<BR>Cheers.