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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Round up to nearest 1000 1

Status
Not open for further replies.

bpenney

Technical User
May 21, 2003
9
US
I need a little help on a formula I'm trying to create. I am using Crystal 8.5 on a MS Jet database within the Ceridian Source 500 product.

I am using a calculated field that gives me 150% of annual earnings for life insurance. I want the calculated field to round up to the nearest 1000.

For example, if the calculated field = 72,150, I want it to give me 73,000.

Any help I can get would be greatly appreciated.
 
Here ya go.

-int(-({your.number.field}/1000))*1000

Mike
 
This will do your "round-up" to the next thousand requirement...

Name : {@150PercentEarningsRounded}
Formula : (Int (({YourTable.Earnings} * 1.5)/1000) + 1) * 1000

Results would return as below -->

Client Earnings 150PercentEarnings 150PercentEarningsRounded
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A 71,567.00 107,350.50 108,000.00
B 99,999.00 149,998.50 150,000.00
C 22,500.00 33,750.00 34,000.00
D 31,500.00 47,250.00 48,000.00
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
This is great guys, thanks a lot!

Brian
 
Another alternative, although this rounds to the closest 1000, is this:

Round({NumberField},-3)

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top