I'm trying to generate a list of unique items from column A of an indeterminate number of sheets. The idea is that over time, more sheets will be added and I don't want to have to update formulas to account for the new sheets.
Test/example spreadsheet https://docs.google.com/spreadsheets/d/193ZTAbn8R-HjwDn2LE2eDDVJk_LbY4V5P9J6ynES6wo/edit#gid=0
In the example, sheets List1, List2, and List3 are the lists from which I want to create a combined list (in sheet "CombinedList") with the items that appear in Column A of each sheet. As the "Desired Outcome" sheet shows, I want to end up with a table that pulls in values associated with each item from each list. I'm ok with manually adding the name of new sheets into Row 1 as they get created; it's just the generation of the list of items in Column A that has me stuck.
I was originally doing something like the following,
=ARRAYFORMULA(UNIQUE(QUERY({'List1'!A2:A;'List2'!A2:A},
"select Col1 where Col1 is not null")))
but instead of having to write out all the names of the lists to query, I'd like to using something like INDIRECT() to reference the sheets that get listed in Row 1. However, I've read several places that INDIRECT and ARRAYFORMULA don't play nice with each other or something.