Round a Calculations

S

serviceenvoy

For labor, we add $50 to our cost and then round to the next highest
$25 increment. So if
the cost was $124, we add $50 using an Iif Statement (iif"laborcost>0,
laborcost+50,0), we would want to round it to the next highest $25
increment so instead of being $174 it would be $175. How can I do
this in a formula or event procedure?


On parts, we like to round to the next highest .99 so if the part was
$7.23, we would want to round that to $7.99.
Can that be done very easily?
 
M

Marshall Barton

For labor, we add $50 to our cost and then round to the next highest
$25 increment. So if
the cost was $124, we add $50 using an Iif Statement (iif"laborcost>0,
laborcost+50,0), we would want to round it to the next highest $25
increment so instead of being $174 it would be $175. How can I do
this in a formula or event procedure?

=Int(((IIf"laborcost>0, laborcost+50,0)+24.99)/25)*25

On parts, we like to round to the next highest .99 so if the part was
$7.23, we would want to round that to $7.99.

=Int(partcost) + .99
 
Top