Calculate number of shifts needed from a table of units

Copper Contributor

Hi, need some help with a problem, simplified it looks like this:

 

I need a formula in B5 that calculates how many shifts I need to produce this amount of units. Say, if I produce more than 150 units I need 2 shifts, 150 and below 1 shift, and for 0 units I need 0 shifts. 

image.png

 

 Anyone knows a suitable function or formula? Thanks

 

 

3 Replies

Eirik, by "more than 150 units" you mean 2 shifts for any number of units (e.g. 170, 310, 800,...) or one shift for every 150 plus units (151 - 2; 302 -3,...)?

 

If the second

=INT((SUM(B1:B4)-1)/150)+1

First alternative, at maximum 2 shifts.

 

Thanks again for helping me out!

 

Eirik

When

=IF(SUM(B1:B4)>150,2,1*(SUM(B1:B4)<>0))