Countifs counting date occurance by Persons name

forest1959

New Member
Joined
Mar 16, 2010
Messages
30
Office Version
  1. 2016
Platform
  1. Windows
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

Any idvise please

regards
Paul
 

Attachments

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

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

forest1959

New Member
Joined
Mar 16, 2010
Messages
30
Office Version
  1. 2016
Platform
  1. Windows
picture with formula
 

Attachments

  • formula.PNG
    formula.PNG
    6.2 KB · Views: 23

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
72,983
Office Version
  1. 365
Platform
  1. Windows
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’)

How about
Excel Formula:
=sumproduct((Sheet1!A$2:A$100=A2)*(Sheet1!B$2:F$100=B1))
 
Solution

forest1959

New Member
Joined
Mar 16, 2010
Messages
30
Office Version
  1. 2016
Platform
  1. Windows
Thanks, Excel 2016 on Windows... I have updated my account details too
 

forest1959

New Member
Joined
Mar 16, 2010
Messages
30
Office Version
  1. 2016
Platform
  1. Windows
and your solution was perfect... Thank you for the prompt response
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
72,983
Office Version
  1. 365
Platform
  1. Windows
Glad to help & thanks for updating your profile.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,466
Messages
5,831,791
Members
430,087
Latest member
meagerd

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top