Pivot Table Countif on Grand Total?

SDWright13

New Member
Joined
Aug 6, 2014
Messages
4
I have a pivot table where I have data broken down for the number of hours a person has worked on particular projects. The very last column of the table is the grand total and I can see how many hours total for the month each person submitted time for. This is a quick check to ensure everyone has input 100% of their time for the month. What I want to do is count the number of people that have submitted 100% of their time (>170 hours for a given month will be the criteria). I could use an equation and execute the countif command on the entire column to ensure I capture all the data as the rows increase or decrease (add or subtract employees), however the table will increase in width as well as I add projects, so my grand total column could move so I would have to change the column reference in my countif function each time the pivot table is refreshed. Is there a way to use the getpivotdata command and embed it in the countif command to perform this calculation? Here is an example of what my data looks like:

B C D E
Project A Project B Project C Grand Total
Employee A 32 52 90 174
Employee B 20 60 50 130
Employee C 40 53 80 173

I can perform the countif function such as this: countif(E:E,">170") and it will return a value of 2. The problem is that if I add a project then it will move the grand total column to column "F" and my count command will be looking at an incorrect column.
 
Last edited:

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Sorry poor formatting

[TABLE="width: 600"]
<tbody>[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Project A[/TD]
[TD="align: center"]Project B[/TD]
[TD="align: center"]Project C[/TD]
[TD="align: center"]Grand Total[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]Employee A[/TD]
[TD="align: center"]32[/TD]
[TD="align: center"]52[/TD]
[TD="align: center"]90[/TD]
[TD="align: center"]174[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD]Employee B[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]60[/TD]
[TD="align: center"]50[/TD]
[TD="align: center"]130[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD]Employee C[/TD]
[TD="align: center"]40[/TD]
[TD="align: center"]53[/TD]
[TD="align: center"]80[/TD]
[TD="align: center"]173[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

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