Multi-Layered Searching in Excel
I have an excel spreadsheet with a list of states, elections in each state, politicians in any given senate/governor race, and the party affiliations of each of those politicians. I would like to create a bar denoting whether each race has a Libertarian competing in it. In my head, it looks something like this:
- Create range that includes all rows.
- Check current politician’s state. Narrow range to include only rows from that state.
- Check current politician’s race. Narrow range to include only rows from that race.
- Use COUNTIF to count the number of times “Libertarian Party” appears in the range.
- If number > 0, there is a Libertarian in a race. Return TRUE. Else return FALSE.
See here for example spreadsheet. SPREADSHEET.
What is the actual code for this? What commands should I use?