Oct 06 2023 02:57 PM
I have a file that I want to consolidate into a single worksheet for purposes of analysis. It is in the form of 188 tables all formatted the same and of consistent size. The tables are columns A to DL and each is rows 8 to 59.
Can you suggest a formula or process to create the single sheet?
Ray
Oct 07 2023 01:59 AM
If we speak about structured tables perhaps Power Query is the easiest way. Start with blank query, add = Excel.CurrentWorkbook()
as the first step, if necessary uncheck other than 188 table names and expand the content.
Oct 07 2023 07:58 AM
Oct 07 2023 07:44 PM
@Ray_Nord -My two cents
=VSTACK(A1:A1,'S1:S4'!A8:DL59)
Oct 08 2023 07:33 AM
VSTACK() assumes some logic in tables location, not only the same structure; or we have to pick-up somehow all 188 table names.
Oct 08 2023 08:42 AM
The tables are simply named "table 1, table 2, table 3" all the way to table 188
Oct 08 2023 09:18 AM
If names are predefined such way, back to the sample
you may generate the spill by formula as
=REDUCE(Table1[#Headers], "Table" & SEQUENCE(6), LAMBDA(a,v, VSTACK(a,INDIRECT(v) ) ) )
, the only in your case it'll be 188 instead of 6.
Or return structured table by Power Query with 4 steps. Generated script is
let
Source = Excel.CurrentWorkbook(),
#"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "Table")),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Name"}),
#"Expanded Content" = Table.ExpandTableColumn(#"Removed Columns", "Content", {"A", "B"}, {"A", "B"})
in
#"Expanded Content"
In general no coding is required, practically all could be done from UI.
Oct 09 2023 10:14 PM - edited Oct 09 2023 10:14 PM
Oct 10 2023 09:52 AM
Perhaps, but we don't know details how exactly tables are located. Let assume all 188 tables are in only one sheet, or in different sheets but locations are different? The only we know for now all sheets have the same structure, i.e. same number of columns and same column names. And they are structured tables, not ranges.