Hello.
I have created a formula in Excel for my workplace, which is meant to alert when a person exceeds 32 work hours in a week (7 consecutive days). The alert says "Ok" when there isn't an occurrence of 32+ hours in 7 consecutive days, and it says "Over 32" when it does occur.
Screenshot 2021-11-23 161036.png
The yellow row are the days of the month, below are the work hours, and under those are the indicators of a shift (1 being morning, 2 being afternoon, and A and B being examples for absence or vacation). I would like the formula for Over/Under 32 to leave out the days marked with "B", so it won't add the hours from the cell above the "B" in the total calculation. For example, if there are 38 work hours in a 7-day window, but 8 of those come from a "B" shift, it should just count it as 30 and alert "Ok"
This is the formula used as of now. It's a bit sloppy, but it works just fine. Is it possible to somehow add my criteria to it?
=IF(SUM(B10:H10)>32;"Over 32"; IF(SUM(C10:I10)>32;"Over 32"; IF(SUM(D10:J10)>32;"Over 32"; IF(SUM(E10:K10)>32;"Over 32"; IF(SUM(F10:L10)>32;"Over 32"; IF(SUM(G10:M10)>32;"Over 32"; IF(SUM(H10:N10)>32;"Over 32"; IF(SUM(I10:O10)>32;"Over 32"; IF(SUM(J10:P10)>32;"Over 32"; IF(SUM(K10:Q10)>32;"Over 32"; IF(SUM(L10:R10)>32;"Over 32"; IF(SUM(M10:S10)>32;"Over 32"; IF(SUM(N10:T10)>32;"Over 32"; IF(SUM(O10:U10)>32;"Over 32"; IF(SUM(P10:V10)>32;"Over 32"; IF(SUM(Q10:W10)>32;"Over 32"; IF(SUM(R10:X10)>32;"Over 32"; IF(SUM(S10:Y10)>32;"Over 32"; IF(SUM(T10:Z10)>32;"Over 32"; IF(SUM(U10:AA10)>32;"Over 32"; IF(SUM(V10:AB10)>32;"Over 32"; IF(SUM(W10:AC10)>32;"Over 32"; IF(SUM(X10:AD10)>32;"Over 32"; IF(SUM(Y10:AE10)>32;"Over 32"; IF(SUM(Z10:AF10)>32;"Over 32";"Ok")))))))))))))))))))))))))
Here's the Workbook attached as well.
Book1.xlsx
Thank you in advance.
Bookmarks