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 Chriss 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 number divisible by 8

Status
Not open for further replies.

katididdy

Technical User
Joined
Mar 13, 2006
Messages
70
Location
US
I'm working on a report that will list the amount of vacation hours to be paid. The hours need to be divisible by 8, but I have been unable to figure out the formula to do so. Can anyone offer any advice?

Thank you in advance!
 
If you're trying to display the number of days available, try:

round({table.vacationhours} / 8,0)

Then to correct the display to eliminate decimals, right click the field and select format field->Number and select the -1123 format.

If you already had the field worked out to divide by 8, you can just right click it select format field->Number->Cistomize and set the rounding to your preference.

-k

Most companies only allow for days which have been entirely earned, in that case it would be:

 
You could use the following formula:

-int(-{Orders.Customer ID}/8)*8

-LB
 
Thank you both for your tips - it worked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top