Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I add rounding methods in my formula? 1

Status
Not open for further replies.

Hueby

MIS
Oct 20, 2004
321
US
Hey all,

I'm dealing with some values like 3.1, 3.3, 3.6, 3.8 etc. and I need to round them to either 3.0, 3.5, or 4.

based on where that number is. Can I place some If..Then statements or something in my formula to help round like I want?
 
You can format your values to round the way you want.

Right click on the data field and choose Format Field -> go to Numbers tab - click on Custom button - go to rounding option and select the way you would like to round. That's it!

Cheers
paulmarr
 
For the nearest 50 cents, try replacing the amount field with a formula:

round({table.amount}/.5)*.5

If you want to round like this conditionally, you can add rounding conditions in a formula and again, use it to replace the field itself.

-LB
 
LB, thank you for the formula. I'm not seeing how your formula will work though. Using 3.4 and 3.8 as examples, and after running through your the formula it comes back to same values.

Where as I would like to see 3.5 and 4.0.... I guess this is called rounding to the nearest .5th value, lol.
 
Oh.. I'm sorry! Disregard the above post.. it does work now. It was my mistake! Thank you for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top