Find number of days worked with formula

asad

Well-known Member
Joined
Sep 9, 2008
Messages
1,434
Hello All,

I am trying to calculate the number of days each person has worked. There may be multiple entries per person for each date and some people may have only one or two entries for each date.
The data is something like this
DateEmployee
1/01/2016Suheyla Alper
1/01/2016Maria Ruggiero
1/01/2016Suheyla Alper
1/01/2016Suheyla Alper
1/01/2016Matchew Liu
1/01/2016Lauren Hammond
1/01/2016Garyfalia Derzotis
1/01/2016Chris Szczabrowski
2/01/2016Suheyla Alper
2/01/2016Maria Ruggiero
2/01/2016Suheyla Alper
2/01/2016Suheyla Alper
2/01/2016Matchew Liu
2/01/2016Lauren Hammond
2/01/2016Garyfalia Derzotis
2/01/2016Chris Szczabrowski
3/01/2016Suheyla Alper
3/01/2016Maria Ruggiero
3/01/2016Suheyla Alper
3/01/2016Suheyla Alper
3/01/2016Matchew Liu
3/01/2016Lauren Hammond
3/01/2016Garyfalia Derzotis
3/01/2016Chris Szczabrowski
4/01/2016Suheyla Alper
4/01/2016Suheyla Alper
4/01/2016Suheyla Alper
4/01/2016Matchew Liu
4/01/2016Lauren Hammond
4/01/2016Garyfalia Derzotis
4/01/2016Chris Szczabrowski

<tbody>
</tbody><colgroup><col><col></colgroup>


And the result I want is:

EmployeeNo of Days Worked
Suheyla Alper4
Maria Ruggiero3

<tbody>
</tbody><colgroup><col><col></colgroup>


How can I do this with a formula. The data table runs into hundreds of thousand of rows. I tried pivot table but it gives me a count of each entry and this is wrong answer.

Thanks
Asad
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I would copy all of the data to another sheet as to keep an original copy. Then using Auto-Filter remove all of the duplicates based on the name and date so that each employee can only be listed once per date. Then use the pivot table. It will work and save you a lot of headaches.

If you need further help with this, just comet and I will help.
 
Upvote 0
Thanks for the solution. It worked. I will use this for the time being and wait for a solution that does not require copy pasting of 15+ columns and 200,000+ rows.
Thanks again.
 
Upvote 0

Forum statistics

Threads
1,214,422
Messages
6,119,396
Members
448,891
Latest member
tpierce

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
Back
Top