Round to next higher integer (e.g. 1.2 to 2)

Hello,
How can I roundoff a decimal to next higher integer?
Example,
I need to roundoff 1.32 to 2.
In existing round function, it would be rounded off to 1 instead of 2.

Welcome to the community, @mandarsathe! You could do it as outlined in the post discussed previously:

Thanks for the prompt response. However this does not solve my problem.
Round function rounds off the decimal to nearest integer. That is 6.2 will be rounded off to 6 and 6.8 will be rounded off to 7.
However I need to roundoff any decimal to next higher integer. That is either 6.2 or 6.8, both should be rounded to 7. How can it be done?

Thanks for the prompt response. However this does not solve my problem.
Round function rounds off the decimal to nearest integer. That is 6.2 will be rounded off to 6 and 6.8 will be rounded off to 7.
However I need to roundoff any decimal to next higher integer. That is either 6.2 or 6.8, both should be rounded to 7. How can it be done?

@mandarsathe, if this is the requirement, you could do it as outlined in the image shared below:

In the survey tab of your xlsform:

Data entry screen as seen in Enketo:

Data entry screen as seen in Enketo:

Reference xlsform:

substring-before substring-after.xlsx (9.5 KB)

1 Like

Hello,
You may just add something like 0.49 before you round. (What about entry 0.0? Do you have negative entry?)

Unfortunately, there is no ceil function available in KoBo/XLSForm.

Thanks a lot. This solves the problem!!!

1 Like

Thanks for the inputs. There wont be any negative entries.