Excel Rounding in Excel

Joined
Oct 14, 2009
Messages
2
Reaction score
0
I am not sure if I am posting right but here is my question. I am trying to do an "IF" function to calculate how many rooms are needed. If the amount of passengers (A1) are less than 4, 1 room, If more than 4 passengers (A1) divide the passenger (A1) by 4 then roundup the answer.
=IF(A1<=4,1,IF(A1>4,A1/4)
This will give the answer I need but evertime I try to insert the ROUNDUP function I get errors. Please if anyone can help, I have been working on this for hours.
 

Ian

Administrator
Joined
Feb 23, 2002
Messages
19,873
Reaction score
1,499
Welcome to the forums :)

Does this work for you?

=ROUNDUP(IF(A1<=4,1,IF(A1>4,A1/4)),0)
 
Joined
Oct 14, 2009
Messages
2
Reaction score
0
Okay I figured out -

=IF(A1<=4,1,IF(A1>4,ROUNDUP(A1/4,0)))

Thanks for the help though, it only took me about 3 hours to figure this one out, I don't think I could have wrote it many more ways.
 
Last edited:

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