Rounding for Inventory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

the I have a calculated field in a report. I need calc field to round to 2
decimal places and if the decimal is greater than .00 (from .01 to .99) then
the decimal should equal .5 . I use this for inventory counting purposes i.e
if a bottle is opened it is counted as 1/2 a bottle. Can this be done? Thanks.
 
Dan,
Not sure how you'll be using this but... the logic would be...
If CalcVal - Int(CalcVal) > 0 Then
CalcVal = Int(CalcVal) + 0.5
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top