Automate MTD summation

G

Guest

I have got a worksheet with 31 columns of data (31 days) from column B
onwards. I would like column A to sum from column B depending on what I put
in cell A1. Eg. If A1 is 3, column A will show result of summation of column
B (day 1) to column D (day 3).
If A1 is 5, column A will show result of summation of column B (day 1) to
column F 9 (day 5) and so on.
Thank you
 
G

Guest

Hi Cheryl,

Enter this formula in A2 and drag down as needed!
=SUM(OFFSET(B2,0,0,1,$A$1))
Regards,
Stefi


„Cheryl†ezt írta:
 
R

RagDyeR

Try this:

=SUM(INDEX(B2:AF2,1):INDEX(B2:AF2,$A$1))*($A$1>0)

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

I have got a worksheet with 31 columns of data (31 days) from column B
onwards. I would like column A to sum from column B depending on what I put
in cell A1. Eg. If A1 is 3, column A will show result of summation of
column
B (day 1) to column D (day 3).
If A1 is 5, column A will show result of summation of column B (day 1) to
column F 9 (day 5) and so on.
Thank you
 

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