Forum Discussion
Need some help with pulling data from a table
So, I'm having a bit of trouble pulling a list of names from one table, onto another table. I have a table on a worksheet named 'I', where all my data and info is, and the table is named 'Shops'. In that table, are all the shops names, and below each shop is all the employee's from that shop. I have another table on another worksheet named 'Store'. I haven't named that table yet (do I need to?). Above that table, in cell D1, is a dropdown list, which is used to select the shop from the Shops table, and I'm trying to figure out how to populate cells A5 to A24 on the Store sheet, with the employee names from the Shops table, dependant on which shop was selected in the dropdown list. I have included a couple of screenshots, in the hopes that they will help.
Any help on this would be greatly appreciated!
Ignore the sizing of some of these cells, as it's due to data below that needed resizing.
If you convert the table on the Store sheet, you can use the FILTER function in B5:
=FILTER(Shops, Shops[#Headers]=D1, "")
This will spill to as many rows as needed.
If you prefer to leave it as a table, that won't work. Enter the following formula in B5 instead, then fill down to B24.
=IFERROR(INDEX(Shops, ROW(A1), XMATCH($D$1, Shops[#Headers])), "")
2 Replies
If you convert the table on the Store sheet, you can use the FILTER function in B5:
=FILTER(Shops, Shops[#Headers]=D1, "")
This will spill to as many rows as needed.
If you prefer to leave it as a table, that won't work. Enter the following formula in B5 instead, then fill down to B24.
=IFERROR(INDEX(Shops, ROW(A1), XMATCH($D$1, Shops[#Headers])), "")
- WriggsCopper Contributor
That worked! Awesome! I've been wracking my brain on this all day, thank you so much!