Results 1 to 11 of 11

20060618, 21:08 #1
 Join Date
 May 2003
 Location
 MidCheshire, England
 Posts
 275
 Thanks
 1
 Thanked 3 Times in 3 Posts
Sum alternate cells (Excel 2000 SP3)
Is there a convenient way to tell Excel to sum alternate cells in either rows or columns? I have 80 columns with text then a number in adjacent cells repeated 40 times in each row. I can type =SUM(B2+D2+F2+H2+J2+ . . . . . . . . +BB2 etc ) but I thought there should be a more elegant way of writing the formula.
Thank you in anticipation of assistance in this question.

20060618, 21:19 #2
 Join Date
 Jan 2001
 Location
 La Jolla, CA
 Posts
 1,398
 Thanks
 26
 Thanked 58 Times in 54 Posts
Re: Sum alternate cells (Excel 2000 SP3)
Since SUM ignores text (treats it as a zero), try: =SUM(B2:CB2)

20060618, 21:21 #3
 Join Date
 Jan 2002
 Location
 The Hague, Netherlands
 Posts
 283
 Thanks
 0
 Thanked 0 Times in 0 Posts
Re: Sum alternate cells (Excel 2000 SP3)
=SUMPRODUCT((MOD(COLUMN(B2:BB2)COLUMN(B2)+0,2)=0),B2:BB2)
Microsoft MVP  Excel

20060618, 21:25 #4
 Join Date
 Mar 2002
 Posts
 84,353
 Thanks
 0
 Thanked 27 Times in 27 Posts
Re: Sum alternate cells (Excel 2000 SP3)
If the values in A2, C2, etc. are really text, use kweaver's formula. If there may be numbers among them:
<code>
=SUMPRODUCT(A2:BB2,1MOD(COLUMN(A2:BB2),2))</code>

20060618, 21:27 #5
 Join Date
 Feb 2002
 Location
 A Magic Forest in Deepest, Darkest Kent
 Posts
 5,681
 Thanks
 0
 Thanked 1 Time in 1 Post
Re: Sum alternate cells (Excel 2000 SP3)
Hi malcolm
Have you tried these forulas
To sum every other row:
=SUMPRODUCT(MOD(ROW(A1:A100),2)*A1:A100) (odd rows)
=SUMPRODUCT((1MOD(ROW(A1:A100),2))*A1:A100) (even rows)
To sum every other column:
=SUMPRODUCT(MOD(COLUMN(A1:Z1),2)*A1:Z1) (odd columns)
=SUMPRODUCT((1MOD(COLUMN(A1:Z1),2))*A1:Z1) (even columns)
Obviously change the range to suit your needsJerry

20060618, 22:31 #6
 Join Date
 May 2003
 Location
 MidCheshire, England
 Posts
 275
 Thanks
 1
 Thanked 3 Times in 3 Posts
Re: Sum alternate cells (Excel 2000 SP3)
Hans  I appreciate very highly your response as well as the others I hope they see this response from me.
Malcolm

20060730, 18:27 #7
 Join Date
 May 2003
 Location
 MidCheshire, England
 Posts
 275
 Thanks
 1
 Thanked 3 Times in 3 Posts
Re: Sum alternate cells (Excel 2000 SP3)
>If the values in A2, C2, etc. are really text, use kweaver's formula. If there may be numbers among them:
=SUMPRODUCT(A2:BB2,1MOD(COLUMN(A2:BB2),2))
As there are numbers in the `text' cells I have used the above formula in the form:
=SUMPRODUCT(H4:BA4,1MOD(COLUMN(H4:BA4),2))
When I enter a number in I4 and press Enter the formula that is in E4 it does not respond; it continues to diplay 0 (zero). Can you see an error in the way I have used your formula?

20060730, 18:35 #8
 Join Date
 Feb 2002
 Location
 A Magic Forest in Deepest, Darkest Kent
 Posts
 5,681
 Thanks
 0
 Thanked 1 Time in 1 Post
Re: Sum alternate cells (Excel 2000 SP3)
Hi Malcolm
I think you will need to convert the text to an integer. A nice and quick trick is to:
1) Type 1 into a blank cell
2) Highlight the cell
3) Edit>Copy
4) Highlight calls H4 to BA4
5) Goto the edit menu select Paste Special
6) Select Multiply
7) Press OK
This will convert any numbers stored as text in the range to a number. I believe this should solve your problem.Jerry

20060730, 19:07 #9
 Join Date
 May 2003
 Location
 MidCheshire, England
 Posts
 275
 Thanks
 1
 Thanked 3 Times in 3 Posts
Re: Sum alternate cells (Excel 2000 SP3)
Jerry,
This is my original question:
Is there a convenient way to tell Excel to sum alternate cells in either rows or columns? I have 80 columns with text then a number in adjacent cells repeated 40 times in each row. I can type =SUM(B2+D2+F2+H2+J2+ . . . . . . . . +BB2 etc ) but I thought there should be a more elegant way of writing the formula.
In cell H4, J4, L4 etc etc through to AZ4 there can be text & as it has turned out since numbers also. I want the formula to ignore H4, J4, L4 etc etc through to AZ4. I want the formula to sum the numbers in I4, K4, M4 etc etc to BA4. that is every second cell in row 4.
Can you help me with that aim please?

20060730, 19:12 #10
 Join Date
 Mar 2002
 Posts
 84,353
 Thanks
 0
 Thanked 27 Times in 27 Posts
Re: Sum alternate cells (Excel 2000 SP3)
You originally stated that you wanted to add the evennumbered columns B, D, F, etc.
Column I is an oddnumbered column (it is the 9th column), so a number in I4 will not be included in the result of the formula  according to your specification!
If you want to add the oddnumbered columns, change the formula to
<code>
=SUMPRODUCT(H4:BA4,MOD(COLUMN(H4:BA4),2))</code>

20060730, 20:08 #11
 Join Date
 May 2003
 Location
 MidCheshire, England
 Posts
 275
 Thanks
 1
 Thanked 3 Times in 3 Posts
Re: Sum alternate cells (Excel 2000 SP3)
Thank you for putting me right. It is very much appreciated.