Round Down an Expression

  • Thread starter Thread starter jlp
  • Start date Start date
J

jlp

Hello -
I have a query that has a calculated field as follows;

ItemsNeeded: Round([Forecast]/[CartonQty],0)

This is working to round off the result to an integer.
However, I need this to Round the result DOWN to to an
integer, not up if greater than .5 and down if less
than .5.

Essentially, I need the "Rounddown" function like in
Excel. Does this exist in Access?

Thank you in advance for your help!!
jen
 
Try Int([Forecast]/[CartonQty],0)

Int just chops off anything after the decimal point,

Cheers,
Peter
 
I have a query that has a calculated field as follows;
ItemsNeeded: Round([Forecast]/[CartonQty],0)

This is working to round off the result to an integer.
However, I need this to Round the result DOWN to to an
integer, not up if greater than .5 and down if less
than .5.

Essentially, I need the "Rounddown" function like in
Excel. Does this exist in Access?

See if this does what you need:

ItemsNeeded: [Forecast] \ [CartonQty]

Note that "\" forces integer division - it drops any fractional value.
 
Both of these methods worked. Thank you for the help!

-----Original Message-----
I have a query that has a calculated field as follows;

ItemsNeeded: Round([Forecast]/[CartonQty],0)

This is working to round off the result to an integer.
However, I need this to Round the result DOWN to to an
integer, not up if greater than .5 and down if less
than .5.

Essentially, I need the "Rounddown" function like in
Excel. Does this exist in Access?

See if this does what you need:

ItemsNeeded: [Forecast] \ [CartonQty]

Note that "\" forces integer division - it drops any fractional value.

--
Bruce M. Thompson, Microsoft Access MVP
(e-mail address removed) (See the Access FAQ at http://www.mvps.org/access)within the newsgroups so that all might benefit.<<


.
 
Back
Top