Rounding up in Mergefields

S

SSwan

Hello.

Sheets is a mergefield of any positive value. I need to divide this value by
25 each time but need it to round the result up everytime to a whole number.

e.g. if sheets = 5, I need the result to be 1
e.g. if sheets = 26, I need the result to be 2 etc.

This is my code thus far:

{ =({MERGEFIELD sheets}/25 \# 0}

Any help would be appreciated. Thanks.
 
S

SSwan

Thanks, I tried that but with a test input of 2, 5, 25, 26, 50, 54, 75, 845 I
got answers of 0, 0, 25, 25, 50, 50, 75, 850 instead of 1, 1, 1, 2, 2, 3, 3,
34???

Doesn't WOPR send Woodys watch etc? I get that. :)

....
 
G

Greg

SSwan,

Macropod will most likely be back to sort you out with his method. In
the meantime this appears to work:

{=INT({TEST}/25 + { IF { =MOD({ Test},25)} > "0""1""0" }) }
 

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