user2588061
user2588061

Reputation: 3

count data using two columns as references

Is it possible to count or countif by using a column as the data, a cell for the criteria (or what to match) and range of what to count?

Here is what I am looking at:

A1  B   C   D   E   F   G   H   I   J   K   L   M   N   O
2   Running Data                                Total Count of Tardies (by category)                    
3   Date    Employees   Leader  Start of Shift  Break 1 Lunch   Break 2     Employees   Start of Shift  Break 1 Lunch   Break 2 Total
4   1-Jul   Abe Sue 15                  Abe                 0
5   3-Jul   Steve   Bob         20          Anna                    0
6   5-Jul   Eve Andy        9       20      Eve                 0
7   7-Jul   Anna    Andy    30                  Helen                   0
8   15-Jul  Abe Sue     15              Mark                    0
9   18-Jul  Anna    Andy    10                  Steve                   0
10  20-Jul  Helen   Sue             9                           0
11  31-Jul  Mark    Bob 45                                      0

I am trying to count the data entered on the left (running data) in each category and having it show based on the Employees on the right (in the orange cells). So Abe should show 1 for Start of Shift, Eve should show 1 for Break 1 and Break 2, and Anna should show 2 for Start of Shift.

I have tried using: =countif(C:C,$J4,D:D) to get the data from JUST Column D for Start of shift, but it gives and error saying too many arguments for the function have been entered.

Help...

...and Thanks!

Upvotes: 0

Views: 782

Answers (1)

SeanC
SeanC

Reputation: 15923

Countif will only look at 1 column to decide what to count.

Countifs will look at multiple columns. Your formula would look something like this:

=COUNTIFS($C:$C,$J4,E:E,">0")

Upvotes: 1

Related Questions