Help

Re: Formula to calculate number of chaperones

1954 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Pascal_Vallet
7 - App Architect
7 - App Architect

I need to calculate automatically the number of chaperones I need for a field trip.
If I have 1 to 30 students, I need 3, 30 to 60, 6, etc… The calculation is: {#of stduents}/30*3. The number is an integer. But if I have 31 students, it gives me 3 as a result while it should be 4. How can I round up the number to the next integer and not the closest one?

5 Replies 5

Hi @Pascal_Vallet,
Might be easier to nest a few IF statements

IF({#ofStudents}<=30, 3, IF({#ofStudents}<=60, 6))

This works in my tests:

ROUNDUP({Number of students} / 30, 0) * 3

Screen Shot 2022-09-26 at 7.54.58 PM

Pascal_Vallet
7 - App Architect
7 - App Architect

Thanks for your help. My explanation was not clear, of we need 3 chaperones for 30 students, which means we need 4 for 31, 4 for 40, 5 for 41, 6 for 50, 59, and 60.

The formula that works for me is this one: ROUND(({# Students}/10+.49)

I don’t think that formula will work for small numbers of students. For example, for 20 students, I expect that formula to produce only two chaperones.

Here’s another variation to throw into the mix.

IF(
  {# Students} <= 30,
  3,
  CEILING({# Students}/10)
)

Thanks for your help, it works !