View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Help with Absence sheet formula.

Do the columns represent days of the week? If so, are there column headers
that are the *dates* for the month?

If that's the case then you can use a formula that tests the header row for
the day of the week and test the data row for those specific criteria:

H80:AL80 = *dates* for the month
H81:AL81 = data

To count instances of a/l, dom, sick, and bev for Mondays:

=SUMPRODUCT(--(WEEKDAY(H80:AL80,2)=1),--(ISNUMBER(MATCH(H81:AL81,{"a/l","dom","sick","bev"},0))))

For the other weekdays, in the WEEKDAY function change =n to:

For Monday: =1
For Tuesday: =2
For Wednesday: =3
For Thursday: =4
For Friday: =5
For Saturday: =6
For Sunday: =7


--
Biff
Microsoft Excel MVP


"Bojan" wrote in message
...
Hi, I manage a monthly absence sheet, we have 4 types of absences "sick;
a/l;
bev; dom" and "late or Early finish"
All of these types of absence are entered in one row for a certain person
on
a certain date. (calendar type of row,31 cells ). At the end of that row I
need to calculate and divide them monthly for each day of the week how
many
absences were there(Mon2; Tue-o; Wed-3 etc...) but excluding the "Late"
or
"early" inputs.
I do have a formula and I thought if there is an simple one that I can
use?
Here is a copy of the formula I use for each day in the week, this is for
Monday only:
=SUM(COUNTIF(H81,"a/l"),COUNTIF(H81,"dom"),COUNTIF(H81,"sick"),COUNTIF (H81,"bev"),COUNTIF(O81,"sick"),COUNTIF(O81,"bev") ,COUNTIF(O81,"dom"),COUNTIF(O81,"a/l"),COUNTIF(V81,"sick"),COUNTIF(V81,"bev"),COUNTIF (V81,"dom"),COUNTIF(V81,"a/l"),COUNTIF(AC81,"bev"),COUNTIF(AC81,"dom"),COUNTI F(AC81,"sick"),COUNTIF(AC81,"a/l"),COUNTIF(AJ81,"a/l"),COUNTIF(AJ81,"dom"),COUNTIF(AJ81,"sick"),COUNT IF(AJ81,"bev"))

thank you