if statement - How to make relation counting in Excel? -
i have table employees, id, name, date , time attend , leave this:
what need make new table based on old table count how many employee attended on each date. did using if
statement this:
=if(b2=total!c:c;count(total!d2:d154))
but doesn't work.
please, have ideas?
assuming 1 employee can attend once day (i see have 1 line 1 employee), following formula might count how many employees attended on particular day:
=countifs(c:c,c1,d:d,">0")
in data, column holds id numbers; b - names; c - dates; d - time when attended, or no value (the cell left blank) if employee did not attend. if used screenshot data, cell c1 represent value of 02/09/2013.
countifs
used count values meet several conditions. in our case have 2 conditions.
first, part c:c,c1
checks how many dates in c1
there in total in column c:c
.
then part d:d,">0"
counts how many cells in column d:d
not left blank (employees attended).
if both conditions on same row satisfied, row counted, otherwise it's not counted. formula processes every row in sheet, have defined in our conditions: c:c
, d:d
.
Comments
Post a Comment