Don't know what formula to use...

CherryxDarling

New Member
Joined
Mar 30, 2011
Messages
39
I'm creating a spreadsheet that basically tells someone how many bathrooms, toilets, drinking fountains etc. are needed per occupant load. I have different ratios for male/female, and what kind of building it is. So that being said I need a formula for these ratios:

Male: 1 per 75 for the first 1,500 and 1 per 120 for the remainder exceeding 1,500

Female: 1 per 40 for the first 1,520 and 1 per 60 for the remainder exceeding 1,520

I want to make it so that when I input a # into cell E19 for example, it will tell me how many bathrooms are needed according to this ratio. However, whatever # is inputed into E19 needs to be divided in half, half of it for males, and half for females.

I know it's complicated and I'm having trouble explaining it all as simply as I can, but if someone can give it a shot I would greatly appreciate it.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
I think i've understood your query correctly. I've done male to start with ... tell me if this is on the right lines.

You would paste this code into whichever cell you want the result to appear in

=IF((E19/2)>1500,20+ROUNDDOWN((E19-1500)/120,0),ROUNDDOWN(E19/75,0))
 
Upvote 0
I think i've understood your query correctly. I've done male to start with ... tell me if this is on the right lines.

You would paste this code into whichever cell you want the result to appear in

=IF((E19/2)>1500,20+ROUNDDOWN((E19-1500)/120,0),ROUNDDOWN(E19/75,0))
Unfortunately that doesn't give me the right answer, but I think we're on the right track here.
 
Upvote 0
ok. Try this one instead!

=IF((E19/2)>1500,20+ROUNDDOWN(((E19/2)-1500)/120,0),ROUNDDOWN((E19/2)/75,0))
 
Upvote 0
ok. Try this one instead!

=IF((E19/2)>1500,20+ROUNDDOWN(((E19/2)-1500)/120,0),ROUNDDOWN((E19/2)/75,0))
Okay that worked! However, I know I should have stated this earlier, but I need the decimal to always be rounded up regardless if it's 29.1 or something. Is that something we could work into the formula?
 
Upvote 0
Why not provide 3 or 4 examples (of the input) and also the expected result of each.
 
Upvote 0
Perhaps change ROUNDDOWN to ROUNDUP in Zakkaroos formula

lenze

Hi Lenze, I THINK round down was right ... I assume that what they're are after is 149 Men = 1 toilet and 150 men = 2. If that's not what Cherry wants then my bad! :stickouttounge:

What I had failed to do was divide everything by 2 :)
 
Upvote 0
Okay that worked! However, I know I should have stated this earlier, but I need the decimal to always be rounded up regardless if it's 29.1 or something. Is that something we could work into the formula?

In that case, as Lenze mentioned above, replace ROUNDDOWN, with ROUNDUP and you should then be good to go. :)

Do you want me to also produce the FEMALE equation or are you ok to edit?

i.e

=IF((E19/2)>1500,20+ROUNDUP(((E19/2)-1500)/120,0),ROUNDUP((E19/2)/75,0))
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,728
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top