SOLVED

SUM

Gold Contributor

Please see my attached file in order to understand what i want to do. I was able to write very simple VBA code to sum the ranges i want but i don't know how to write this formula.

I want to enter the formula in cell B10 and drag formula to D10 and in this example the formula has to return 143, 49 and 34.

2 Replies
best response confirmed by OliverScheurich (Gold Contributor)
Solution

@OliverScheurich 

As variant

=INDEX( $A$4:$AA$4,COLUMN() ) +
 INDEX( $A$6:$AA$6,COLUMN() + (COLUMN() - COLUMN($A$6) - 1) )  +
 INDEX( $A$6:$AA$6,COLUMN() + (COLUMN() - COLUMN($A$6) ) )

 

Thank you very much! Sometimes VBA is easier for me than writing a formula.
1 best response

Accepted Solutions
best response confirmed by OliverScheurich (Gold Contributor)
Solution

@OliverScheurich 

As variant

=INDEX( $A$4:$AA$4,COLUMN() ) +
 INDEX( $A$6:$AA$6,COLUMN() + (COLUMN() - COLUMN($A$6) - 1) )  +
 INDEX( $A$6:$AA$6,COLUMN() + (COLUMN() - COLUMN($A$6) ) )

 

View solution in original post