Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Selectable Column SUM

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.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200805/1

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Selectable Column SUM

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))

"RobN via OfficeKB.com" wrote:

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.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200805/1


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Selectable Column SUM

This should work fine, thanks Joel!

Joel wrote:
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.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200805/1

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selectable Criteria GoodTrouble Charts and Charting in Excel 7 January 23rd 08 09:11 PM
How do I add N/A to a selectable cell with an arrow? Patrick Excel Worksheet Functions 1 August 30th 06 12:39 AM
How do I make a line non-selectable? Shinka Excel Discussion (Misc queries) 4 October 5th 05 09:25 PM
How do I insert a selectable circle in Excel? stauff Excel Worksheet Functions 1 October 28th 04 09:28 PM
Help please- user selectable image Regnar Excel Programming 1 April 21st 04 06:09 PM


All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"