# Countifs counting date occurance by Persons name

#### forest1959

##### New Member
Good afternoon

On Sheet 1 I have a list of data, in column A i have a persons name, in column B through to F I have dates that the person is on annual leave, there are multiple names with duplicates in column A

On sheet 2 i have a persons name in cell A2 and a specific date in cell B1, I am trying to count how many times that person has the specific date listed

My formula is

=COUNTIFS(Sheet1!A:A,Sheet2!A2,Sheet1!B:F,Sheet2!B1) but its bringing back #VALUE!

=COUNTIF(Sheet1!A:A,Sheet2!A2) brings back the number of times the persons name is in column A and =COUNTIFS(Sheet1!B:F,Sheet2!B1) counts the number of times the date is located in the 5 columns, but they don't work together

regards
Paul

#### Attachments

• Data.PNG
3.6 KB · Views: 31
• formula.PNG
2.7 KB · Views: 31

### Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
picture with formula

#### Attachments

• formula.PNG
6.2 KB · Views: 43
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Excel Formula:
``=sumproduct((Sheet1!A\$2:A\$100=A2)*(Sheet1!B\$2:F\$100=B1))``

Thanks, Excel 2016 on Windows... I have updated my account details too

and your solution was perfect... Thank you for the prompt response

Replies
7
Views
112
Replies
1
Views
236
Replies
8
Views
820
Replies
2
Views
218
Replies
1
Views
71

1,218,691
Messages
6,143,941
Members
450,516
Latest member
shironokuro

### 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