Pivot Table Question

justin7878

New Member
Joined
Nov 24, 2016
Messages
1
Hello -- I am trying to make a pivot table that will display the number of days worked in a month. Now there could be several entries for each day but basically I want to have a count of days per month by employee.

I don't know if I am explaining this properly so I will give an example

Employee ID Date
54 01/10/2012
54 01/10/2012
54 02/10/2012
54 02/10/2012
54 02/10/2012
54 30/10/2012

What I essentially want is the for a count of days worked. So the results would be the employee worked 3 days out of the 31.

How do I set this up in excel?

Thank you for any help you can give me.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

RMS123

Board Regular
Joined
Jun 1, 2016
Messages
62
This should work:
Enter the following formula into C2 (Assuming your columns are in A & B) then fill down. This should give you a unique value based on the 2 columns. Label Column "Days Worked" for example.

=IF(SUMPRODUCT(($A$2:$A2=A2)*($B$2:$B2=B2))>1,0,1)

Select Date (Group by month) Employee ID & Days Worked for pivot table.

Regards.
 
Upvote 0

Forum statistics

Threads
1,195,682
Messages
6,011,132
Members
441,586
Latest member
rodsin76

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