If you are willing to use Power Query (as a 2010 user, you will need to download the add in. It is standard part of Excel in 2016 and later)
To unpivot the data is shown in the following Mcode and displayed on the same sheet you have the data unpivoted on
We can then add a combo box on the original data page and parametize it to show only the Factor you want listed.
For the parameter which is the combo box, we build Mcode as follows
Finally, we input the parameter into the first code.
Now when you use the drop down to select your Factor, (by the way which you can list all your factors), it will filter your data when you select the Refresh button on the Power Query Tab.
Here is your file that you can test once you add PQ to your Excel. No VBA is required to do this. All this code is generated by the User Interface.
Review PQ
In the attached file
Click on any cell in the new table
On the Data Tab, click on Queries & Connections
In the right window, double click to open Query
Review PQ steps
M-code basics:
- "let" is the start of a query
- "in" is the closing of a query
- each transformation step sits in between those 2 lines
- each step line is ended by a comma, except the last one
- "Source" is always the first step (Source Data)
- After "in" you have the last step referenced
Bookmarks