A shorter formula for cell G3:
=IFERROR(TRANSPOSE(FILTER($D$3:$D$16,COUNTIFS($B$3:$B$11,$D$3:$D$16,$A$3:$A$11,F3))),"")
Regards
Amit Tandon
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Summary: I can use the FILTER function to filter based on the specific criteria I enumerate in the formula. But if my list of criteria is long, I'd rather pull them out of the formula, list them as an array (i.e., a column of criteria), and ask Excel to filter based on that list. How do I do this?
**************
Suppose I have the follow data table on the left of the screenshot below, and the desired output on the right. Here, for each fruit, I want a horizontal listing of the sizes in which it is available.
I can achieve this as follows:
But as you can see from Column D, the list of possible size descriptions is prodigious, and I don't want to have to list all of them in the formula, since that would make it unwieldy. Thus I'd instead like to filter based on the array of sizes listed in Column D. I tried the following, in which I asked Excel to filter based on the values in B2:B100 equalling whatever values are in D2:D100, but it didn't work:
=TRANSPOSE(SORT(UNIQUE(FILTER($B$3:$B$1001,(($B$3:$B$101=$D3:$D101)*($A$3:$A$101=$F3)),""))))
And neither did this:
=TRANSPOSE(SORT(UNIQUE(FILTER($B$3:$B$101, ISNUMBER(SEARCH($B$3:$B$101,$D$3:$D$101)*($A$3:$A$101=$F3))))))
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
A shorter formula for cell G3:
=IFERROR(TRANSPOSE(FILTER($D$3:$D$16,COUNTIFS($B$3:$B$11,$D$3:$D$16,$A$3:$A$11,F3))),"")
Regards
Amit Tandon
Formula in cell F3:
=SORT(UNIQUE(FILTER(A4:A15,A4:A15<>"")))
Formula in cell G3 to be copied down:
=IFERROR(TRANSPOSE(FILTER($D$3:$D$16,ISNUMBER(MATCH($D$3:$D$16,FILTER($B$3:$B$11,$A$3:$A$11=F3),0)))),"")
Regards
Amit Tandon
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more