I'm trying to create a dynamic list based on a set criteria. I have a list of Agents, and a list of Team Codes and I want to be able to "select" a team code and "extract" the list of agents for said team based on the criteria.
It's really not much more complicated (as far as the data is concerned) than this:
Team Agent
Team1 Him
Team1 Her
Team2 Me
Team2 You
and I select Team1 and get Him and Her in a list, or Team2 and get Me and You in a list.
I assume you want to get these via a formula. You can do this with a version of the
INDEX-SMALL
pattern.Picture for ranges
The formula in
F2
is an array formula (enter with CTRL+SHIFT+ENTER). It needs to be copied down far enough to get all your matches. I overdid it in the picture above. The input is taken from cellE3
You can see this related post which has a fuller explanation of how that formula works.
If you do not want the errors, wrap the formula in an
IFERROR(..., "")
.Thanks for the assistance guys.
What I actually wound up using was an array formula that worked like a charm.
I realized that the question asks for a formula to generate a list, however since there is no mention of the final use for such a list, so I wonder if a PivotTable would fit for your purpose. (see below samples)