2

I have a table of data similar to:

Sample

where I'd like to get just the shapes which match a set of given criteria (in this case week=2 and colour=blue).

I can return the first result using index and match like:

=ArrayFormula(INDEX(C2:C14,MATCH($F$1&$F$2,A2:A14&B2:B14,0))) 

but I'd like to return the all matching values (eg square and triangle) in to the range F3:Fsomething. This would preferably be done using a formula that returns a range and isn't "copied-down", as a list of all possible shapes isn't known beforehand.

How can I modify this formula to achieve this?

2 Answers 2

1

See if this works:

=FILTER (C2:C14, B2:B14=F2, A2:A14=F1)
Sign up to request clarification or add additional context in comments.

Comments

0

to do multiple criteria you want to use * like so

=FILTER (C2:C14, (B2:B14=F2) * (A2:A14=F1))

and if you want the results all in the same cell with a delimiter, use TEXTJOIN

=TEXTJOIN([DELIMETER],[IGNORE EMPTY TEXT],text1)

=TEXTJOIN(", ",TRUE,FILTER(C2:C14,(B2:B14=F2)*(A2:A14=F1)))

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.