ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Pivot table and counting (https://www.excelbanter.com/excel-worksheet-functions/6825-pivot-table-counting.html)

ChristopherH

Pivot table and counting
 
Hi.
I have a pivot table with 17,000 rows and 6 columns. The data is just a
count of what is in the columns.
Example: of fruit eaten during a day
apple oranges bananas total
bob 1 1 0 2
jane 1 0 1 2
fred 0 0 1 1
sue 0 0 0 0

How would I count up all the times that only a banana was eaten during a
day? Use an array or Formula? Not sure how I would do this with a pivot
table.

Thanks,
Chris




JulieD

Hi Chris,

i would use the SUMPRODUCT function

=SUMPRODUCT(--(D3:D17000=1),--(B3:B17000=0),--(C3:C17000=0))

for more details on the sumproduct function check out
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

Cheers
JulieD


"ChristopherH" wrote in message
...
Hi.
I have a pivot table with 17,000 rows and 6 columns. The data is just a
count of what is in the columns.
Example: of fruit eaten during a day
apple oranges bananas total
bob 1 1 0 2
jane 1 0 1 2
fred 0 0 1 1
sue 0 0 0 0

How would I count up all the times that only a banana was eaten during a
day? Use an array or Formula? Not sure how I would do this with a pivot
table.

Thanks,
Chris







All times are GMT +1. The time now is 11:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com