Forum Discussion
Multi-line range used for summing specific column
A11 should read 14 (because right now the named range only includes the 5th and 7th row. Once I update the range to also include the 9th row, I'll want the row 11 result to automatically show 27 (the addition of 13 from A9)
hope that clarifies.
- TwifooMar 13, 2019Silver Contributor
In the attached file, the formula in A11 is:
=SUM(INDEX(A:A,G1):INDEX(A:A,G2))
G1 and G2 are the cell references for the start and end of the row to sum, respectively.
- Detlef_LewinMar 13, 2019Silver Contributor
With your definition of _testrange2 only this will work:
=INDEX(_testrange2,0,1,1)+INDEX(_testrange2,0,1,2)
Which is the same as:
=SUM(A5;A7)
You definitely should reconsider your setup as Jan Karel already suggested.
- txrussianguyMar 13, 2019Brass Contributor
Detlef_Lewinand JKPieterse , Would love to have your thoughts on how to use pivots. Here is a small extract of the way the file works.
Basically, there is a section of assumptions (to be more precise, a section for each of 30-50 'types' of customers, and each section has about 10 parameters that dictate the behavior of revenue for that customer). Then there are a number of cost sections that do similar calculations. There are two concepts (one of which is shown in attached):
- there is 'absolute time' (the dynamics that happen to a group of customers depending on when they join in the lifecycle of the company. So in this example, months 1-5 would have 50 of revenue, and months 6 onward (36-month modeling window) would have 100.
- then there is the concept of relative time (the dynamics that a customer group experiences, depending on when they join, relative to their month of joining). To relate this to what everyone may recognize, this is the sort of "sign up and get one month free" type of dynamic. If you sign up in the company's month 6 of operation, then that's 'relatively' your month 1 with the company.
Each section has a subtotaling of the units (people/customers) that are derived using the assumptions, and the revenues (units multiplied by price and chargeability factor). Those revenues are what would make up this named range I want. The ability to expand that revenue total by including additional lines, from newly modeled sections, is how this question came about.
That's the brief description, to try to explain what the file shows. Again, this is two assumptions of one section. There will be up to 50 types of these sections, and there are about 20 assumptions. Obviously can't really debate the need for the assumptions. It is what it is, as part of a business model that's being modeled. I love pivots, would love to use them, so if any thoughts on how to do this efficiently, happy to see it. Right now, with what I've shown here, and the limited number of sections that are modeled out, the file is 14K lines long. If I were to flip it vertically (one thought I had, to enable pivoting, including using a 'Period' sort of column to delineate each month, each data element, etc., the file would turn into 36 times that length...again, that's having modeled out only about 4 of these sections.
Happy to hear thoughts. Thanks.
- Detlef_LewinMar 13, 2019Silver Contributor
Sorry, I don't have the time to dive deeply in that very special model.