Totalling x columns based on value of a cell

A

annysjunkmail

In L2:AA2 I have weekly scores. There are 400 rows in the sheet.
How do I show totals in AB2 based on week no, which always appears in
cell, say A1.
For example

L2 M2 N2 O2 P2 Q2...
1 2 3 4 5 6

If G2 = 3. Total = 6 (L2+M2+N2)
If G2 = 5. Total = 15 (L2+M2+N2+O2+P2)

Thanks
Tony
 
W

wouter.magre

Hi Tnony

I am using the Dutch version of Excel and tried to translate the
function I have made for you problem

=SUM(L2:INDIRECT(ADDRESS(ROW(L2;),COLOUMN(L2)+AB2)))

HTH

Executor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top