round up

S

Sledge

i don't want to wear out my welcome, but

i have a report for a mailout. i'm getting it tell me how many mail
bags i need. there's a max of 43 items in a bag so i came up with the
formula =([CountOfContactID]/43)

that gives me an answer with decimal places. Or if i cut it to 0
decimal places it rounds to the nearest integer. i need it to round
up, whatever the result.

i'm sue it must be simple, but i can' find it. is it something to do
with the Fix function

slege
 
J

John Parkinson

Sledge,

This is my first response to a question, so if I am off
base please forgive me.

If you have a formula for the number of bags (decimal)
find the integer of that number.

BagsNumber = ([CountOfConatctID]/43)
BagsEven = integar[BagsNumber]
If BagsNumber-BagsEven <0
Then BagsTotal = BagsEven + 1
EndIf

You would have to Dim the variables beforehand.

John
 
S

Sledge

Sledge,

This is my first response to a question, so if I am off
base please forgive me.

If you have a formula for the number of bags (decimal)
find the integer of that number.

BagsNumber = ([CountOfConatctID]/43)

Thanks for the reply John. Unfortunately it kinda showed me hwo little
i know. but i'm a good learner so may i ask...

is what you described a module? if so do i somehow refer the formula
in the report to that?

If you don't have time to go into the details that's okay. i've got a
couple of books here and i just need to know which bit to read.

sledge
 
V

Van T. Dinh

Try the formula:

= - Int([CountOfContactID] / 43)

For example (from Debug window):

?-Int(-20/43)
1
 

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

Top