Warm tip: This article is reproduced from stackoverflow.com, please click
google-sheets

Google Sheets: Pulling data from tab 2 to tab 1 based on a drop down variable from tab 1

发布于 2020-03-28 23:17:39

Sheet reference I'm currently working with: https://docs.google.com/spreadsheets/d/1UxwkzBTnwOLV341Vciy8_NWylMSSjhb7SkFDqVW6ImI/edit?usp=sharing

So, kinda what the title says.. I'm completely stumped here.

Trying to pull the data (including the column headers) over from tab 2 into tab 1 based on the drop down (grey colored) menu item chosen by the user in tab 1. (The "potions" are listed in column A of Tab 2 as well, row 1 indicates "herbs" required for any particular potion by the variable numbers in the corresponding cells for the "potions")

Essentially, you choose a "potion" in the grey drop down, then a "recipe list" will populate in the remaining white space in tab 1.

Any ideas here?

Questioner
Teejay Parker
Viewed
69
Kishan 2020-01-31 18:00

Try the following formula in cell B12:

=transpose(filter(transpose(filter('Recipe Data'!B:BJ,(row('Recipe Data'!A:A)=1)+('Recipe Data'!A:A=B9))),len(transpose(filter('Recipe Data'!B:BJ,('Recipe Data'!A:A=B9))))))