# Count occurrences of a value based on condtions in both the column and row

#### mcs9b

##### New Member
I have a spreadsheet already set up which assigns call (represented by "C") to different people over the entire year. I am looking for a formula that gives an ongoing tally of how many calls each person has based on the day of the week. The spreadsheet looks like this (obvously a very abbreviated version):

A B C D E F G H I J K L M N O

1 JANUARY su mo tu we th fr sa su mo tu we th fr sa.......
2 Jim C C C C
3 John C C C
4 Jane C C C C C
5
6 FEBRUARY su mo tu we th fr sa su mo tu we th fr sa.......
7 Jim C C C C C
8 John C C C
9 Jane C C C
10
11 MARCH su mo tu we th fr sa su mo tu we th fr sa.......
12 Jim C C C
13 John C C C
14 Jane C C

At the bottom of the spreadsheet I have the following table which gives a running tally of calls by day of the week:

su mo tu we th fr sa
20 Jim 2 1 4 2 1 0 2
21 John 3 1 0 1 2 1 1
22 Jane 1 2 2 2 0 3 0

How do I generate these tallies based on the name and day of the week?

### Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Here's a 2 step process:
Enter your days in Q1:W1 (ie: Su, Mo, etc)
Enter this in Q2 and copy down and across to give you Calls by month:
Code:
``=COUNTIFS(\$B2:\$O2,"C",\$B\$1:\$O\$1,Q\$1)``

Now enter this in B20 and copy down and across:
Code:
``=SUMIF(\$A\$2:\$A\$14,\$A20,Q\$2:Q\$14)``

Replies
2
Views
225
Replies
2
Views
526
Replies
4
Views
210
Replies
6
Views
448
Replies
2
Views
277

1,219,993
Messages
6,151,353
Members
451,021
Latest member
alejandrolima

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back