Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How do I count the number of times a value appears in the cells of one column as long as the cell in another row matches another value?

$
0
0

I may have worded this poorly but I'll explain. I have a legislation tracker and what I would like to do the following:

I have a column in which I would like to count the number of times a given legislator has co-sponsored legislation that we support. I had found a formula that would allow me to count the number of times a given legislator is mentioned in this particular column. Here is that formula:

=counta(IFERROR(filter(flatten(iferror(split(Legislation!$G$2:G$200,", ",false))),match(flatten(iferror(split(Legislation!$G$2:$G$200,", ",false))),split(A2,", ",false),0))))

The above formula accurately counts the number of times the selected legislator (A2 is the legislator) is mentioned in the co-sponsor column. The co-sponsor column is a multi-select dropdown that includes every co-sponsor for each bill.

I want to filter (I guess maybe?) down to only cells in the Co-sponsor column (column G of Legislation tab) that we Support (column D of Legislation tab)

Here's a copy of the spreadsheethttps://docs.google.com/spreadsheets/d/1-mzNN4ZuITjBknODzXa6C21MXJrqoUNYKvoR3xvSOyM/edit?usp=sharing


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>