sumif for a specific number of cells

S

simon1982

I have a 52 columns, one for each week of the year. Each column has 10 rows
of data. I need a totals line which, for each row, sums 13 columns (13 weeks)
but the 13 colums it sums needs to be changable ie sum weeks 1-13 or 14-27 or
32-35 etc. Any idea how I make this formula driven - my thoughts were to use
a sumif formula and input the criteria to sum the numbers between week 14 and
27 (taking 14 and 27 from an input in another cell).

Any ideas on how I solve this? Thanks. Simon
 
P

Pete_UK

At the bottom of the 13th column (M?), put this formula:

=SUM(A2:M11)

Then just copy it across.

Hope this helps.

Pete
 
P

Pete_UK

I think I misread your requirements. You want a total on each row,
which covers 13 columns (which can be variable)?

Assuming your data occupies A2:AZ11, then put 1 in BA1 and this
formula in BA2:

=SUM(INDIRECT("RC"&BA$1&":RC"&BA$1+12,0))

Copy this down to BA11. It will sum up 13 columns for each row,
starting with the column number in BA1 - just change this value for a
different 13 columns (max 40).

Hope this helps.

Pete
 

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