Ensuring 3 cells do NOT match
If the shift data is in A1 thru A3 then:
=MAX(COUNTIF(A1:A3,"D"),COUNTIF(A1:A3,"S"),COUNTIF (A1:A3,"M"))
will return 2 or 3 if you have a problem
alternatively
=(A1=A2)+(A2=A3)+(A1=A3)
will return non-zero if you have a problem
--
Gary''s Student - gsnu200743
"GIdunno" wrote:
I'm back with another problem :-)
I work a crew schedule; and I have 3 people who cannot work a shift
together. I need something that will NOT allow me to put them on a shift
together. We identify our shifts by D, S, or M (days, swings, mids) So I
cannot have Buck, Earle, or Small working a shift together. (weird rules
about these three)
I can't use conditional formatting for this because I already have used all
3 conditions for another issue.
Is there a way I can "raise a flag" if I schedule 2 or more of them on the
same shift?
Here's an idea of my schedule
Earle is in C7, Buck is in C27, and Small is in C51. If I were putting day
shift together in column D, then D7, D27, and/or D51 cannot match.
Any ideas O' Smart Excel people?
|