How to count only true values of a column when filter other columns

gm91

New Member
Joined
Dec 8, 2020
Messages
7
Office Version
  1. 2019
Platform
  1. MacOS
Hi all. I have an excel sheet with the following columns:

COLUMN ACOLUMN B
TRUEPREMIER LEAGUE
FALSECHAMPIONS LEAGUE
TRUELIGUE 1
FALSEPREMIER LEAGUE
FALSECHAMPIONS LEAGUE
FALSEPREMIER LEAGUE
TRUELIGA

I would to create a cell C1 with the percentage of true values for each filtered value of column B. So, if I filter with 'PREMIER LEAGUE' value in column B I want the percentage of true values for this occurrence. It is possible in excel?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Have a look, the values are filtered and it is working perfectly fine
 

Attachments

  • Screenshot_2.jpg
    Screenshot_2.jpg
    76.6 KB · Views: 6
Upvote 0
Try this to get the percentage of True Values:

=SUMPRODUCT(SUBTOTAL(3,OFFSET(A2:A8,ROW(A2:A8)-MIN(ROW(A2:A8)),,1))*((A2:A8)=TRUE()))/SUMPRODUCT(SUBTOTAL(3,OFFSET(A2:A8,ROW(A2:A8)-MIN(ROW(A2:A8)),,1)))
Unfortunately it doesn't work well. In case no filter is applied on column B it works fine, but in case there is a filter on column B it calculates the divisor always equal to 0.
 
Upvote 0
@gm91
Are you doing this in Excel, or some other app?
 
Upvote 0
@Fluff I tried it on excel and it works. At first I was trying on google sheets and it doesn't work. I do not understand why
 
Upvote 0
Sheets & Excel are not the same, whilst there are a lot of similarities not everything works.
In future, if you need a solution for Sheets rather than Excel, you should post in the "General Discussion & Other Applications" sections & clearly state that you are using sheets.
Thanks.
 
Upvote 0
Sheets & Excel are not the same, whilst there are a lot of similarities not everything works.
In future, if you need a solution for Sheets rather than Excel, you should post in the "General Discussion & Other Applications" sections & clearly state that you are using sheets.
Thanks.
Ok thanks
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,595
Members
449,089
Latest member
Motoracer88

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