I'm doing an online schedule and need to count how many shifts people work.
Each month is a sheet and each employee is on the same row each month.
They will either have A (shift 1) B (shift 2) X (off) H (holiday) ill
(sick day). Right now i've created a bunch of countif functions
=COUNTIF(B4:F4,"A*") then repeated the same thing for B and so on. Is there
a quicker/easier way to get it to count A* or B*. The logic would be
something like =COUNTIF(B4:F4,("A*" OR "B*"))
Thanks Ian.
Dave Peterson - 11 Nov 2007 23:34 GMT
=SUM(COUNTIF(B4:F4,{"A*","B*"}))
0r you could count each:
=countif(b4:f4,"A*") + countif(b4:f4,"b*")
> I'm doing an online schedule and need to count how many shifts people work.
> Each month is a sheet and each employee is on the same row each month.
[quoted text clipped - 6 lines]
>
> Thanks Ian.

Signature
Dave Peterson
Bernard Liengme - 11 Nov 2007 23:37 GMT
Am I missing something or could you use
=COUNTIF(B4:F4,"A*") +COUNTIF(B4:F4,"B*")
Have you looked a Pivot Tables?
best wishes

Signature
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email
> I'm doing an online schedule and need to count how many shifts people
> work.
[quoted text clipped - 8 lines]
>
> Thanks Ian.
Ian - 12 Nov 2007 01:27 GMT
too easy -- overthinking it. I'll try the pivot too. thx. Ian.
> Am I missing something or could you use
> =COUNTIF(B4:F4,"A*") +COUNTIF(B4:F4,"B*")
[quoted text clipped - 12 lines]
> >
> > Thanks Ian.