Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Selectable Column SUM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RobN - 27 May 2008 17:13 GMT
I am trying to determine a method which will allow me to sum a specific
number of cells in a row of data based on a cell value (in this case values
in col B). An example should be worth a 1000 words:

       A       B        C        D        E        F       G
1    part1   #cols   col1    col2    col3    col4    col5
2     AA       2         1        2        0         1       0
3     BB       1         1        1        0         1       1
4     CC       3         2        2        2         2       2

Desired Output (located in another worksheet)
       A       B                      C                      D
.....
1    part1   #cols                col1                  col2             .....

2     AA    =C2+D2          =D2+E2            =E2+F2          .....
3     BB    =C3                =D3                  =E3                .....
4     CC    =C4+D4+E4    =D4+E4+F4      =E4+F4+G4    .....

Any help would be greatly appreciated.
Joel - 27 May 2008 17:36 GMT
use sum with offset.

C2 - the row of data starting at C2
0 - the x-offset of data from C2
0 - the y-offset of data from Ce
1 - the number of rows to sum which is 1
B2 - the number of columns to add.

=SUM(OFFSET(C2,0,0,1,B2))

> I am trying to determine a method which will allow me to sum a specific
> number of cells in a row of data based on a cell value (in this case values
[quoted text clipped - 16 lines]
>
> Any help would be greatly appreciated.
RobN - 27 May 2008 17:58 GMT
This should work fine, thanks Joel!

>use sum with offset.
>
[quoted text clipped - 11 lines]
>>
>> Any help would be greatly appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.