0

I’m working on an Excel workbook that has data spread across multiple sheets (e.g., "Coal", "Steel", "Turbofuel", "Computer"). Each sheet contains arrays of data related to different resources (like Coal, Water, Iron, etc.), with associated values such as Produced, Used, and Excess. I've successfully gathered all the unique resource names into a single column on a summary sheet using formulas, but I'm encountering an issue when trying to sum the associated values across the sheets. The problem arises because the arrays on each sheet are not the same size, and some resources are repeated across sheets. This results in spill errors when I try to combine them into one summary column. I need to sum the values for each unique resource across the different sheets, but the varying array sizes and spread-out data are making this difficult to achieve. Any advice on how to effectively sum these values into a single array would be greatly appreciated! I would also prefer to do this with out VBA as I have had issues with it in the past.

My formula for gathering unique text data in the summary page: UNIQUE(FILTERXML("<t><s>"&TEXTJOIN("</s><s>", TRUE, $AA$4#, $AB$4#, $AC$4#, $AD$4#)&"</s></t>", "//s")) and AA through AD is found:

LAMBDA(c,
    FILTER(
        INDIRECT(c & ":" & c ),
        (INDIRECT(c & ":" & c ) <> "") *
        (ROW(INDIRECT(c & ":" & c)) > 2)
    )
)(CHAR(AA$3 + 64))

where row three is the column number of the found data. I don't like this approach and would rather use a single formula to find all the unique data.

I get each column of data in my summary page by:

LAMBDA(x,c,
    IFERROR(
        FILTER(INDIRECT("'" & x & "'!$" & c &":$" & c), INDIRECT("'"&x&"'!$S:$S") = TRUE),
        NA()
    )
)
(INDIRECT(ADDRESS(1, COLUMN())),
 INDIRECT(ADDRESS(2, COLUMN())))

My summary page: image of summary page

2
  • It appears to me that time would be better spent reformatting your data input. What I mean is instead of 4 data tables find a way to combine them into one table (something close to unpivoting). Then it should almost be repivoting/filtering to get the various tables in your summary page. Good luck. Commented Oct 1, 2024 at 15:12
  • I'm not sure if this will work as the data in the other sheets can change size at any time. Commented Oct 1, 2024 at 20:58

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.