Forum Discussion
Marcus_Booth
Feb 14, 2025Copper Contributor
How to return counts of text cells across multiple worksheets in same workbook?
I'm working in Excel 365. Windows environment. Working in the Excel app but will be posting to a shared drive for multi-user data entry. 38 worksheets, one for each office. What I need is to be...
SergeiBaklan
Feb 19, 2025MVP
Suggested by Patrick2788 Power Query could be simplified a bit, actually we may have only one query
let
Source = Excel.CurrentWorkbook(),
Tabs = Source{[Name="OfficeTabs"]}[Content][Office Tabs List],
Tables = List.Transform( Tabs, (q) => q & "Tbl"),
SelectTables = Table.SelectRows(Source, each List.Contains( Tables ,[Name] ) ),
SelectContent = Table.SelectColumns(SelectTables,{"Content"}),
NamesToKeep = {"Office", "Entered By", "Status:"},
ExpandContent = Table.ExpandTableColumn(SelectContent, "Content", NamesToKeep)
in
ExpandContent
loaded into the grid as PivotTable. If transformation of each table is required and/or it'll be ranges, not tables - above works as idea, changes won't be dramatically complex.
See CombineOffices query in attached.