Formula Help: Calculating a percentage

chiccaboom

New Member
Joined
May 6, 2016
Messages
3
Hi everyone,

I am so close to solving this formula but I can't figure it out. Please help!

yearsitey/nhelper cell
2017TWH01
2017TWH11
2017BAR11
2017BAR11
2017BAR11
2017BAR01
2017BAR01

<tbody>
</tbody>


What I want to happen is that when you filter "YEAR" for either 2016 or 2017, I want Table 2. to automatically calculate the percentage of YES=1 from column "Y/N" but ONLY OUT OF the total responses for the specified site indicated in Table 2.

So for example, if you filter YEAR for 2017, in Table 2. the percentage for site TWH should show up as 50% b/c there is only one 1 out of 2 responses for TWH.

Similarly, for site BAR, in Table 2 the percentage should be 60%.

However, what is happening, is that the formula in Table 2. is calculating the number of Yes=1 for each site out of ALL the responses in the Y/N column.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You might be able to use the subtotal function.

This will show the % of 1's in column C:

=SUBTOTAL(9,C:C)/SUBTOTAL(2,C:C)
 
Upvote 0
try


Excel 2012
ABC
1yearsitey/n
22017TWH0
32017TWH1
42017BAR1
52017BAR1
62017BAR1
72017BAR0
82017BAR0
9
10
11yearsite
122017TWH50%
132017BAR60%
Sheet3
Cell Formulas
RangeFormula
C12=COUNTIFS($B$2:$B$8,B12,$C$2:$C$8,1)/COUNTIFS($A$2:$A$8,A12,$B$2:$B$8,B12)
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

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