ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Adding column data (https://www.excelbanter.com/excel-worksheet-functions/5664-adding-column-data.html)

stge

Adding column data
 

I have a column 'A' in which there is a number representing the number
of days
the event takes.

in the next 7 columns are a set of numbers representing number
of events happening on that day, (columns B_H)

in the next 7 columns (I-O) is where I want the result so that should
the number
of days in column 'A' be greater than 1 then the result carries over to
the
next column adding up any event that is happening on that day (from
the events per day columns).

Event
Type # of Events per day Result required
# of days B C D E F G H I J K L M N O
1 2 0 2 2 0 0 0 2 0 2 2 0 0 0

2 4 4 0 0 0 0 0 4 8 4 0 0 0 0

4 0 5 0 0 0 0 0 0 5 5 5 5 0 0

Any help or suggestions would be appreciated, I am using v2002 Excel
Many thanks
stge


--
stge
------------------------------------------------------------------------
stge's Profile: http://www.excelforum.com/member.php...o&userid=16068
View this thread: http://www.excelforum.com/showthread...hreadid=275223


Bernie Deitrick

stge,

Assuming your table is in A1:H4, in cell I2, use the formula

=SUM(OFFSET(B2,0,0,1,MAX(-(COLUMN(B2)-1),-$A2)))

and copy to I2:O4.

HTH,
Bernie
MS Excel MVP

"stge" wrote in message
...

I have a column 'A' in which there is a number representing the number
of days
the event takes.

in the next 7 columns are a set of numbers representing number
of events happening on that day, (columns B_H)

in the next 7 columns (I-O) is where I want the result so that should
the number
of days in column 'A' be greater than 1 then the result carries over to
the
next column adding up any event that is happening on that day (from
the events per day columns).

Event
Type # of Events per day Result required
# of days B C D E F G H I J K L M N O
1 2 0 2 2 0 0 0 2 0 2 2 0 0 0

2 4 4 0 0 0 0 0 4 8 4 0 0 0 0

4 0 5 0 0 0 0 0 0 5 5 5 5 0 0

Any help or suggestions would be appreciated, I am using v2002 Excel
Many thanks
stge


--
stge
------------------------------------------------------------------------
stge's Profile:

http://www.excelforum.com/member.php...o&userid=16068
View this thread: http://www.excelforum.com/showthread...hreadid=275223





All times are GMT +1. The time now is 01:46 AM.

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