Forum Discussion
Create Lookup to Variable Sheet Name and Dynamic Cell Reference Based on 2 Drop Down Validations
- Feb 04, 2021
Restructuring your data for analysis is a good option.
Given what you have, traditional Excel is likely to produce an error-prone mess. Both Excel 365 and Power Query offer sensible ways forward.
For 365, I would identify the data for each State with a sheet scoped defined name. The task of the INDIRECT formula is then to return data for the State using a fully qualified name.
= LET( stateData, INDIRECT(state&"!data"), n, XMATCH(Product, stateData), IFERROR(INDEX(stateData, n+{2;3;4}), {"Not stocked";"";""}) )The picture also shows a product list for a validation dropdown
cpatomba If possible, collect all your sales transactions into one single table. Dedicate one column for the State. Then you can easily summarise the data using pivot tables or filters.
- cpatombaFeb 06, 2021Copper Contributor
Riny_van_Eekelen Thanks. I have tried to restructure the data and right now it is looking like this. The idea is the same just changed my drop downs to city and division. Trying to use a combination of index, match and concatenate right now to retrieve the restructured data which is now residing in one single tab inside of 50 tabs.