XML RSS
What is this?
Add to My Yahoo!
Add to My MSN
Add to Google

Home
Whats New!
Need a database?
Tips via email
Learn VBA
Questions Answered
Access Tips Index


How Many Whole Numbers

This is a quick tip this week. Has there ever been a time when you wish to return how many whole numbers are in a division equation, without the decimals. As an example, how many 6’s are there in 32.

If you used the usual Access formula:

32/6

then the result would be:

5.333333 etc.

You could try rounding the number or setting the decimal place to display only integers, but both of these may not give you the correct result each time.

A quick and easy way is to use the following formula:

32\6

Note the slash is a back slash instead of the normal forward slash of the division key.

This formula will give you the result of:

5

Remember, if using this formula in a form or report, add an = sign to the beginning.

 

Do you like this tip? Subscribe to my weekly Newsletter to receive tips weekly via email. Click Here to subscribe.

footer for Microsoft Access page