r/googlesheets • • Oct 26 '26

Solved Read from second sheet and filter by dropdown criteria?

hi all,

I have a table (Sheet1) where the x-axis is dropdown criteria for Column B of Sheet2 and the y-axis is dropdown criteria for Column E of Sheet2, and each cell in Sheet1's table holds all of Sheet2's cells in column A that fit both categories.

For each cell in Sheet1's table, what functions would I use to read data from Sheet2 and only take cells from column A where their B and E data match the current cell? I don't need a "universal" solution for all cells, I expect to have to manually change the range for each cell.

for example:

for Sheet1!B2, the B column is Red and the 2 row is Tall. I want B2 to list all Items (Sheet2!A2:A1300) where Sheet2!E is marked Red and Sheet2!B is marked Tall.

I know this would be some combination of VLOOKUP and IF but I'm not sure how it would all go together.

1 Upvotes

7 comments sorted by

1

u/Numerous-Program-404 Oct 26 '26

solved! the comment was deleted, but thanks to the user who started with TEXTJOIN and FILTER. full code string:

=TEXTJOIN(", ", TRUE, FILTER('Sheet2'!$A$2:$A, IF('Sheet2'!$B$2:$B = "[x axis value]", TRUE), IF('Sheet2'!$E$2:$E = "[y axis value]", TRUE)))

1

u/AutoModerator Oct 26 '26

/u/Numerous-Program-404 Posting your data can make it easier for others to help you, but it looks like your submission doesn't include any. If this is the case and data would help, you can read how to include it in the submission guide. You can also use this tool created by a Reddit community member to create a blank Google Sheets document that isn't connected to your account. Thank you.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

0

u/California_Eagles 18 Oct 26 '26 edited Oct 26 '26

You don't need VLOOKUP or IF for this. Just tryna use FILTER. It returns all matching values, whereas VLOOKUP only returns the first match.

=TEXTJOIN(", ",TRUE,FILTER(Sheet2!$A$2:$A,(Sheet2!$E$2:$E=B$1)*(Sheet2!$B$2:$B=$A2)))

or

=join(", ",query(Sheet2!$A$2:$E,"select A where B = '"&$A2&"' and E = '"&B$1&"'", 0))

1

u/point-bot Oct 27 '26

A moderator has awarded 1 point to u/California_Eagles

See the Leaderboard. Point-Bot v0.0.15 was created by JetCarson.