Forum Discussion
Problem with a formula in Excel
Is this what you mean?
=SUM(INDEX(I:I,C19603):INDEX(I:I,D19603))/SUM(INDEX(I:I,C$19610):INDEX(I:I,D$19610))
=SUM(INDEX(I2:I19598;C19601):INDEX(I2:I19598;D19601))/(SUM(INDEX(I2:I19598;C$19610)):INDEX(I2:I19598;D$19610))
I made this from it but I still get an error, the purpose is to use the number in the cells C19601, D19601, C19610 and D19610 to select an area in the database to sum up and get a grand total. In this way I want to divide the database in pieces per 10% from lowest to highest, after that I divide that through the top 10% to get a percentage. Both sums are already in de Code but there still is an area thats wrong.
A simple example to understand my issue is maybe:
In cell A5 there is a code that has the outcome 5
In cell A6 there is a code that has the outcome 50
The thing I want is to generate a code that does =SUM(I5:I50)
I only want to do it in the way from =SUM( I(A5) : I(A6) ), this is only not the correct way and I have no idea how to do this correctly.
- PeterBartholomew1Sep 06, 2019Silver Contributor
This at least starts with working formulas.
= SUM( INDEX($I:$I,A5) : INDEX($I:$I,A6) )
The comma or semi-colon separator is determined by your language localisation.
I only use Names to reference data so a version that I would use looks more like
= SUM(subList)
where 'sublist' refers to
= INDEX(list, firstRow ) : INDEX(list, finalRow )
I assume you will be happier with the first version.
- basboon1Sep 09, 2019Copper Contributor
PeterBartholomew1 I found to a way to implement the formulas correctly, thanks for your help!