Okay, after a lot of deadends, I decided hiding the rows that don't have data is the easiest way to go.
First, You don't need that second data table. I used this formula in your yellow table which can be dragged across and down
=IF(ISNUMBER(MATCH($I21,$D$1:$D$7,0)),VLOOKUP($I21,$I$2:$M$8,COLUMN(B1),FALSE),"")
Then it's necessary to write an event driven macro to hide rows that aren't being used.
Copy the code here into your spreadsheet. To do that;
1. Right click on the sheet tab and "View Code"
2. Paste the code into the large text box that is in the window that opens up (that window is the VBA Editor)
3. Close that window
Questions?
Bookmarks