does someone know How I can make the Excel to provide the subtotal based on the Company?
When I try the standard subtotal then it does not give me the right subtotal.
does someone know How I can make the Excel to provide the subtotal based on the Company?
When I try the standard subtotal then it does not give me the right subtotal.
Copyright © 2021 Jogjafile Inc.

This is what you need to do to make the
SUBTOTALfeature of Excel to work:To use the
Subtotalfeature ofExcelyou cannot have blanks for theCompanyColumn. You should have got an error message stating :Not reinventing the process to fill down from above, you can refer this answer* on how to do it and then use the
Subtotalfeature.To outline the process, I did (Just in case one cannot follow .gif)
Companyrange till the last row --> hit ALT+H+FD+S to open theGo To Specialor can follow the answer*. ClickBlanks--> enter = --> click ▲ and hit CTRL+ENTER together.Subtotal(will again get an error pop because there are blanks --> nevermind selectOKand move ahead)At each change in:-->Company-->Use Function:-->SUM-->Add Subtotal to:--> CheckValue--> select in below onlyValue--> HitOK(Selections are as per one's preference and requirements).InvoiceColumn and filter out blanks --> SelectCompanyCol --> hit ALT+; to select visible cells and press DEL from your keyboard --> remove filters to get what you need.May be not elegant or neat, but you could achieve this using
Excel Formulasassuming noExcel Constraintsand usingMS365then:• Formula used in cell F2
LET()function makes easier to read, eliminates redundant ranges, increases performance._Datavariable is the source range defined._Companyvariable whereSCAN()andTAKE()function is used. Using theTAKE()function grabbing theCompanyrange. Next, usingSCAN()filling all the blanks from above value. Here, the initial value is an empty string which is the[initial_value]while the one returned usingTAKE()is the range which needs to be filled in, it uses aLAMBDA()helper function, wherexis the[accumulator]andyis the current range. If the current cell is empty it usesxwhile if not empty then retains they, keeps iterating until and unless its filled up._Valuevariable is thevaluecolumns grabbed usingTAKE()function._Sumvariable usesBYROW()function, which applies a customLAMBDA()calculations to each row in the array and returns one output per row.TRUEandFALSErespectively.DROP()function used twice, which drops the last cell from the array. WhileHSTACK()function is used to combine the arrays into one and stack horizontally, to return the final output.Note: The
zerosare hidden usingCustom formatting-->General;;