I have several tables in one tab which I have named individually. In another tab I have a table that I wish to populate with the same information of the selected table based on a drop down selection. All tables are the same size. The dropdown is also a named range.
The list in the dropdown is the name of each table.
The following is my approach but I’m off by a row. ‘PRCoverage’ is the name of the dropdown.
The issue is that the tables don’t all start in the same row. I’m trying to figure out to way to reference the first row in each table.
To begin with, I’ve put everything onto one sheet for screenshots, this will work across multiple pages.
- I began by having a list I could use for a drop down list in cell
F1. This is the named range in
TableList. Once I had this name, that is how cell
- Next, you will see in the formula in
F1that I have two named ranges. These are dynamic named ranges. To create them: Select cell
F1, then CTRL+F3 to open the name manager. Then select the “New” button. For this demonstration I named it
Male_Characters. For the formula I used:
=Sheet1!A3Please note I am not using absolute references (no “$”). Repeat this for the starting corner of every table you want to display.
- Finally, create a nested if statement that works through each table as you can see in my screen shot.
=IF($F$1=$A$1,Male_Characters,IF($F$1=$A$12,Female_Characters,""))is the same code in all the cells of my display table.
Sample Spreadsheet: Click Here
We can get the in which entries of particular start with something like the following:
I then use
OFFSET to fill my
=OFFSET(INDIRECT("Sheet2!A" & ROW(INDIRECT(MyDropDown))),ROW()-2,COLUMN()-1)
But you can just as easily swap
=INDEX(INDIRECT("Sheet2!A" & ROW(INDIRECT(MyDropDown))),ROW()-2,COLUMN()-1)