Forum Discussion
jdr_lzv
Mar 18, 2024Brass Contributor
Automate range to sum
Hi, I have thousands of calculations to sum over specific ranges. I know how to use the basic formula =sum(E1:E20), but that requires me to manually highlight the range to sum. In the calculations...
- Mar 18, 2024
Solution using offset:
Use this formula in H4:
=SUM(OFFSET($C$4,E4-1,,F4-E4+1))
offset decides where to start and how much to cover.
OliverScheurich
Mar 18, 2024Gold Contributor
=SUM(INDEX($C$4:$C$13,MATCH(E4,$B$4:$B$13,0)):INDEX($C$4:$C$13,MATCH(F4,$B$4:$B$13,0)))
This formula returns the results from range G4:G8.