ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Automate MTD summation (https://www.excelbanter.com/excel-worksheet-functions/97859-automate-mtd-summation.html)

Cheryl

Automate MTD summation
 
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

Stefi

Automate MTD summation
 
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:

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


RagDyeR

Automate MTD summation
 
Try this:

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

--

HTH,

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

"Cheryl" wrote in message
...
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




All times are GMT +1. The time now is 04:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com