IF Function

Occasional Visitor

I'm looking to write an equation / function for a lavatory fixture count which will allow calculations below the lowest divisor value.


1 LAV / 40 occupants for the 1st 80 occupants;
1 LAV / 80 occupants thereafter.


This equation will not work if I have less than 80 occupants:

=IF(D26>80,(D26-80)/80+80/40), where cell D26 = number of occupants.


Any suggestions? 

1 Reply


= IF( occupants < 80, occupants/40, 1 + occupants/80 )

Since occupants is a single value rather than a list of alternatives, you could also have

= MIN( occupants/40, 1 + occupants/80 )

Either way, to avoid partial fixtures, you will need to round up, giving

= CEILING( IF( occupants < 80, occupants/40, 1 + occupants/80 ), 1 )

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies