Summarizing data by row and column headers
Our take
In the realm of data management and analysis, the ability to summarize values efficiently is crucial, especially for professionals relying on spreadsheets for decision-making. A recent inquiry highlights a common challenge faced by users: the need for a single in-sheet formula that can summarize values based on row and column labels without the complexity of multiple formulas or VBA. This request reflects a broader shift toward more intuitive, user-friendly solutions in spreadsheet technology, echoing sentiments seen in discussions such as Help Stop Query from Ruining my Tables and the evolving landscape of data manipulation tools.
The user in question is already familiar with SUMIFs but finds that its limitations hinder their ability to address their specific summarization needs. Indeed, while functions like HSTACK offer flexibility, they come with the burden of manual setup that can slow down workflow and reduce productivity. The struggle to find an efficient method to summarize data speaks to a larger issue in spreadsheet design: the necessity for accessible solutions that integrate seamlessly into users' existing processes without requiring extensive technical knowledge. As highlighted in our article, "[Q] Double Major or Double Degree in Data Science and Statistics?" (/post/q-double-major-or-double-degree-in-data-science-and-statisti-cmpnavnpp0mfhs0glyeqguqeu), the demand for data proficiency is on the rise, making it critical for tools to adapt to user needs.
What makes this discussion particularly relevant is the context of Office 365 and its evolving capabilities. With its robust feature set, users expect more from their spreadsheet applications, including the ability to define arrays and receive summarized results effortlessly. The limitations of INDEX and MATCH in returning only the first matching result underscore the need for innovative solutions that can cater to the diverse complexities of real-world data. As users become increasingly accustomed to leveraging AI and advanced functionalities, it is essential for spreadsheet technology to keep pace, ensuring that users can focus on analysis rather than grappling with cumbersome formulas.
Looking ahead, the conversations around simplifying data summarization in spreadsheets hint at a significant shift in how we approach data management. Users are not only seeking tools that enhance their productivity but are also craving an intuitive experience that allows them to engage with their data more meaningfully. As developers continue to innovate and refine these capabilities, we may soon see solutions that fundamentally change how users interact with their data, making it feel more accessible and less daunting. The question remains: as we push for more user-friendly features, how will this evolution impact the future landscape of spreadsheet technology and the professionals who rely on it? This is a trend worth watching as we navigate the intersection of data complexity and user empowerment.
I am looking for a single in-sheet non-VBA formula solution to summarize values by row and column labels.
I am familiar with SUMIFs but this formula does not appear to be able to handle this use case. I can solve this with the likes of HSTACK but that still involves setting up multiple formulas manually within the master HSTACK formula. I am more interested in a formula in which I define the array, column headers, and row headers, and it summarizes appropriately. INDEX and MATCH comes close, in a sense, but it is limited to returning the first matching result rather than summarizing all matching results.
I am using Office 365 desktop. My knowledge is intermediate.
Here is some example data. I will not be working with large data sets.
And here is the result I'm looking for (I would provide the row and column headers - the formula would only be expected to return the summarized data into the array)
[link] [comments]
Read on the original site
Open the publisher's page for the full experience
Related Articles
- Is there a way to reference an array of arrays?Is there a way to get Excel to use an array of arrays in in a formula? Instead of writing a formula that references an array and dragging it down through a column, can I write the formula in a way that results in an output of SUM(O2#),SUM(O3#),SUM(O4#),SUM(O5#),...,SUM(O1000#)}? I work with enormous data sets, but they vary in size. Since I need the workbooks to work with any amount of data, I end up dragging formulas down extra far, leaving rows that just output empyy values when the data doesn't reach that far. If I can make the formula reference an array of arrays then I could eliminate all those garbage rows. Thank you. Unfortunately, because a security restrictions, I can't use macros or VBA at all. I need to do it everything through standard excel syntax. EDIT: Sorry, I didn't make it clear that I used SUM() as an example to try and simplify and generalize. Here's a more explicit example of what I'm doing: ID Data Col C Col D A 14 =UNIQUE(ID#) =IF($C1="","",LET(ArrSt1,TRIMRANGE(DROP($B:$B,4),2),ArrSt3,TRIMRANGE(DROP($H:$H,4),2),ArrA,(FILTER(ArrSt3,ArrSt1=C2,)),TRANSPOSE(FILTER(ArrA,ArrA<>"")))) A 23 =IF($C2="","",LET(ArrSt1,TRIMRANGE(DROP($B:$B,4),2),ArrSt3,TRIMRANGE(DROP($H:$H,4),2),ArrA,(FILTER(ArrSt3,ArrSt1=C2)),TRANSPOSE(FILTER(ArrA,ArrA<>"")))) A 42 =IF($C3="","",LET(ArrSt1,TRIMRANGE(DROP($B:$B,4),2),ArrSt3,TRIMRANGE(DROP($H:$H,4),2),ArrA,(FILTER(ArrSt3,ArrSt1=C3,)),TRANSPOSE(FILTER(ArrA,ArrA<>"")))) B 1 =IF($C4="","",LET(ArrSt1,TRIMRANGE(DROP($B:$B,4),2),ArrSt3,TRIMRANGE(DROP($H:$H,4),2),ArrA,(FILTER(ArrSt3,ArrSt1=C4,)),TRANSPOSE(FILTER(ArrA,ArrA<>"")))) B 2 =IF($C5="","",LET(ArrSt1,TRIMRANGE(DROP($B:$B,4),2),ArrSt3,TRIMRANGE(DROP($H:$H,4),2),ArrA,(FILTER(ArrSt3,ArrSt1=C5,)),TRANSPOSE(FILTER(ArrA,ArrA<>"")))) B =IF($C6="","",LET(ArrSt1,TRIMRANGE(DROP($B:$B,4),2),ArrSt3,TRIMRANGE(DROP($H:$H,4),2),ArrA,(FILTER(ArrSt3,ArrSt1=C6,)),TRANSPOSE(FILTER(ArrA,ArrA<>"")))) B =IF($C7="","",LET(ArrSt1,TRIMRANGE(DROP($B:$B,4),2),ArrSt3,TRIMRANGE(DROP($H:$H,4),2),ArrA,(FILTER(ArrSt3,ArrSt1=C7,)),TRANSPOSE(FILTER(ArrA,ArrA<>"")))) B 90 =IF($C8="","",LET(ArrSt1,TRIMRANGE(DROP($B:$B,4),2),ArrSt3,TRIMRANGE(DROP($H:$H,4),2),ArrA,(FILTER(ArrSt3,ArrSt1=C8,)),TRANSPOSE(FILTER(ArrA,ArrA<>"")))) B 94 =IF($C9="","",LET(ArrSt1,TRIMRANGE(DROP($B:$B,4),2),ArrSt3,TRIMRANGE(DROP($H:$H,4),2),ArrA,(FILTER(ArrSt3,ArrSt1=C9,)),TRANSPOSE(FILTER(ArrA,ArrA<>"")))) =IF($C10="","",LET(ArrSt1,TRIMRANGE(DROP($B:$B,4),2),ArrSt3,TRIMRANGE(DROP($H:$H,4),2),ArrA,(FILTER(ArrSt3,ArrSt1=C10)),TRANSPOSE(FILTER(ArrA,ArrA<>"")))) ... =IF($C1000="","",LET(ArrSt1,TRIMRANGE(DROP($B:$B,4),2),ArrSt3,TRIMRANGE(DROP($H:$H,4),2),ArrA,(FILTER(ArrSt3,ArrSt1=C1000,)),TRANSPOSE(FILTER(ArrA,ArrA<>"")))) Output: ID Data Col C Col D Col E Col F F A 14 A 14 23 42 A 23 B 1 2 90 94 A 42 "" B 1 "" B 2 "" B "" B "" B 90 "" B 94 "" "" ... "" There are a lot of data manipulations omitted, so if something seems weird (like the empty cells in Data Col) please ignore it. The questions is how to eliminate the unneeded rows in Col D. Thank you. EDIT2: Studying the BYROW, SCAN, and MAP suggestions, led to this page on Exceljet, https://exceljet.net/glossary/array-of-arrays , that suggests my question is a known problem in Excel's engine and there is no work-around. Thank you to everyone who tried to help. submitted by /u/TwitchyDingo [link] [comments]
- Formula to copy rows by category but keep continuous row numbers (1,2,3...) instead of original row IDs?Hey everyone, I need some Excel advice. I have a Master Sheet (Sheet 1) where I log entries and assign them a category (e.g., Fruit, Vegetable, Meat). I want to create separate sheets for each category (Sheet 2 for Fruits, Sheet 3 for Vegetables, etc.). I know I could just use the standard built-in filter on the Master Sheet, but that is exactly what I want to avoid. If I filter for "Vegetable" on the Master Sheet, Excel just hides the other rows, so the visible row numbers look like 5, 32, 85... Instead, I need a formula for the "Vegetables" sheet that automatically pulls the data from the Master Sheet, but stacks the rows perfectly from the top down, so that the row numbers in the new sheet read continuously as 1, 2, 3, 4, 5... without any gaps or keeping the original row coordinates. What is the best, dynamic formula to achieve this in modern Excel? Thanks! submitted by /u/Realistic-Crew4379 [link] [comments]
- Is there a way to Sumifs up to a certain column with multiple criteria?Hi everyone, I’m looking for a formula to sum all of the columns starting from a particular column up to a particular column. How do I best do that? On the data tab, Row 1 I have the following columns: A1 = date B1 = serial number C1 = customer name D1 = date 1, with the data being $ E1 = date 2, with the data being $ F1 = date 3, with the data being $ In a separate tab I have the same thing mirroring the data tab, but without the $, for the calculation what I intend to do is on E2, I want to say if $A2 = E$ 1, then sum all of D up to E column on the data tab provided that the value on B column of the data tab match B2 of the calc tab, and C column of the data tab match C2 of the calc tab. For F2, it would be the same thing, but sum column D up to column F instead of column E. I hope it makes sense. Thanks for your help! submitted by /u/botng [link] [comments]
- Efficient use of dynamic array formulas for reportI've got a table of employee data which contains both their unique identifier (Data column E), role (data column AE), location (data column A) and FTE (data column AB). In this data, employees may appear multiple times as they have contracts which may span location and / or role types. On my intended report I have roles listed in column A (A16 to A36), location in row B (B3 to Y3) and in each location I have row C titled "headcount" or "FTE" alternating. Each location therefore has two columns to report against (I'll call these HC column and FTE column) In HC column I have this formula:- =IFERROR (ROWS (UNIQUE (FILTER(Data!$E:$E,(Data!$A:$A=B$3)*(Data!$AE:$AE=$A6)))),0) In FTE column I have this formula:- =SUMIFS(Data!$AB:$AB,Data!$AE:$AE,$A6,Data!$A:$A,B$3) All of which work fine. However, because the dynamic array formula for HC Column is computing the Unique(filter()) formula many times on the spreadsheet, it is CPU heavy. With help from AI, if I had a table just with the HC column data being reported I could use a single spill formula (I had to turn the data in to a table) which appears a lot less CPU intensive. But I lose the two column layout which I'd like to preserve. I could implement a third sheet to pull through from this formula and the sumifs data, but is there a way to combine the two formulae above so that each alternating column returns HC or FTE as appropriate? Each col has HC or FTE as a header. =LET( uAE, $A6:$A$36, uA, $B$3:$Y$3, makeSum, LAMBDA(ae,a, SUMIFS(TData[COL_E], TData[COL_AE], ae, TData[COL_A], a)), MAKEARRAY(ROWS(uAE), COLUMNS(uA), LAMBDA(r,c, makeSum(INDEX(uAE, r), INDEX(uA, c))) ) ) submitted by /u/yellow_barchetta [link] [comments]