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

rounding up to the nearest 25

Status
Not open for further replies.

fancyface

IS-IT--Management
May 17, 2006
104
CA
Hi there. At one time I was given this formula to mimic the ceiling function:

Round(({database.field+2.4999}/5,0)*5

at that time I wanted to round to the nearest $5. Now I need to round to the nearest $25. What should my new numbers be to achieve this?

 
Try this

floor(({table.field}+12.4999)/25)*25
 
I think you just need to use:

round({table.number}/25)*25

...as long as you really mean you want the nearest value. If you want to round up, there is a function in XI:

roundup({table.number}/25)*25

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top