Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Folks,
I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
John,
=SUMPRODUCT(--(MOD(COLUMN(E23:KK23),2)=1),E23:KK23) Mike "John Blackwell" wrote: Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Please array enter (Ctrl+Shift+Enter) the following formula SUM(IF((MOD(COLUMN(E23:I23),2)<0),E23:I23)) What this formula does is that if the column number/2<0, then it sums up the numbers from those columns. -- Regards, Ashsih Mathur Microsoft Excel MVP www.ashishmathur.com "John Blackwell" wrote in message ... Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Fantastic Mike - thank you.
Sorry to be a pain, but how do I sum the other cells - i.e. D23, F23, H23, J23, L23 etc etc, up to KK23? John "Mike H" wrote: John, =SUMPRODUCT(--(MOD(COLUMN(E23:KK23),2)=1),E23:KK23) Mike "John Blackwell" wrote: Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
Glad I could help for d23 etc use this =SUMPRODUCT(--(MOD(COLUMN(D23:KK23),2)=0),D23:KK23) Note all Ive done is change the range and altered the modulus to zero. Columns D, F etc are even numbered so for D the formula days 2 mod 2 = 0 Mike "John Blackwell" wrote: Fantastic Mike - thank you. Sorry to be a pain, but how do I sum the other cells - i.e. D23, F23, H23, J23, L23 etc etc, up to KK23? John "Mike H" wrote: John, =SUMPRODUCT(--(MOD(COLUMN(E23:KK23),2)=1),E23:KK23) Mike "John Blackwell" wrote: Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Mike,
What is the significance of -- in formula. Harshawardhan Shastri "Mike H" wrote: John, =SUMPRODUCT(--(MOD(COLUMN(E23:KK23),2)=1),E23:KK23) Mike "John Blackwell" wrote: Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
For an explanation of the double unary minus, see
http://www.mcgimpsey.com/excel/formulae/doubleneg.html -- David Biddulph "HARSHAWARDHAN. S .SHASTRI" wrote in message ... Mike, What is the significance of -- in formula. Harshawardhan Shastri "Mike H" wrote: John, =SUMPRODUCT(--(MOD(COLUMN(E23:KK23),2)=1),E23:KK23) Mike "John Blackwell" wrote: Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You could also try these two:
=SUM(NPV({0,-2},D23:K23))/2 =SUM(NPV({0,-2},,D23:K23))/2 "John Blackwell" wrote: Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Clever. How do you find these Lori?
-- Regards, Peo Sjoblom "Lori" wrote in message ... You could also try these two: =SUM(NPV({0,-2},D23:K23))/2 =SUM(NPV({0,-2},,D23:K23))/2 "John Blackwell" wrote: Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Peo, i make them up :-) i figure there are many functions out there
which can be put to good use as long as you're aware of the limitations. NPV is a good example - other useful values for rate a 1/-0.5: for a binary sum 9/-0.9 : for a decimal sum Big/small: for the first or last value eg: =NPV(1e20,A1:K1)*1e20 returns the first non-blank value in the row. Or...in Excel 2007 (cse): =NPV(-0.9,,IFERROR(MID(A1,51-ROW(1:50),1)%,""))&"" extracts the numeric portion of a string such as "apple 123 banana 345 pear 567 orange 678" - 123345567678 "Peo Sjoblom" wrote: Clever. How do you find these Lori? -- Regards, Peo Sjoblom "Lori" wrote in message ... You could also try these two: =SUM(NPV({0,-2},D23:K23))/2 =SUM(NPV({0,-2},,D23:K23))/2 "John Blackwell" wrote: Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks for the info Lori, very interesting.
I love the last one and I know how to get numbers from a string as long as they are in one place. -- Regards, Peo Sjoblom "Lori" wrote in message ... Thanks Peo, i make them up :-) i figure there are many functions out there which can be put to good use as long as you're aware of the limitations. NPV is a good example - other useful values for rate a 1/-0.5: for a binary sum 9/-0.9 : for a decimal sum Big/small: for the first or last value eg: =NPV(1e20,A1:K1)*1e20 returns the first non-blank value in the row. Or...in Excel 2007 (cse): =NPV(-0.9,,IFERROR(MID(A1,51-ROW(1:50),1)%,""))&"" extracts the numeric portion of a string such as "apple 123 banana 345 pear 567 orange 678" - 123345567678 "Peo Sjoblom" wrote: Clever. How do you find these Lori? -- Regards, Peo Sjoblom "Lori" wrote in message ... You could also try these two: =SUM(NPV({0,-2},D23:K23))/2 =SUM(NPV({0,-2},,D23:K23))/2 "John Blackwell" wrote: Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell |
#12
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Mike,
This formula help me also for sum of the products at alternate columns. I just wanna know the impact of '--' in a formula for better understanding... Thnx, Vibhor On Thursday, September 25, 2008 5:29 AM JohnBlackwel wrote: Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell On Thursday, September 25, 2008 5:41 AM Mike wrote: John, =SUMPRODUCT(--(MOD(COLUMN(E23:KK23),2)=1),E23:KK23) Mike "John Blackwell" wrote: On Thursday, September 25, 2008 5:44 AM Ashish Mathur wrote: Hi, Please array enter (Ctrl+Shift+Enter) the following formula SUM(IF((MOD(COLUMN(E23:I23),2)<0),E23:I23)) What this formula does is that if the column number/2<0, then it sums up the numbers from those columns. -- Regards, Ashsih Mathur Microsoft Excel MVP www.ashishmathur.com "John Blackwell" wrote in message ... On Thursday, September 25, 2008 6:06 AM JohnBlackwel wrote: Fantastic Mike - thank you. Sorry to be a pain, but how do I sum the other cells - i.e. D23, F23, H23, J23, L23 etc etc, up to KK23? John "Mike H" wrote: On Thursday, September 25, 2008 6:13 AM Mike wrote: Hi, Glad I could help for d23 etc use this =SUMPRODUCT(--(MOD(COLUMN(D23:KK23),2)=0),D23:KK23) Note all Ive done is change the range and altered the modulus to zero. Columns D, F etc are even numbered so for D the formula days 2 mod 2 = 0 Mike "John Blackwell" wrote: On Thursday, September 25, 2008 10:31 AM HARSHAWARDHANSSHASTR wrote: Mike, What is the significance of -- in formula. Harshawardhan Shastri "Mike H" wrote: On Thursday, September 25, 2008 12:59 PM David Biddulph wrote: For an explanation of the double unary minus, see http://www.mcgimpsey.com/excel/formulae/doubleneg.html -- David Biddulph "HARSHAWARDHAN. S .SHASTRI" On Thursday, September 25, 2008 1:06 PM Lor wrote: You could also try these two: =SUM(NPV({0,-2},D23:K23))/2 =SUM(NPV({0,-2},,D23:K23))/2 "John Blackwell" wrote: On Thursday, September 25, 2008 1:17 PM Peo Sjoblom wrote: Clever. How do you find these Lori? -- Regards, Peo Sjoblom On Thursday, September 25, 2008 3:49 PM Lor wrote: Thanks Peo, i make them up :-) i figure there are many functions out there which can be put to good use as long as you're aware of the limitations. NPV is a good example - other useful values for rate a 1/-0.5: for a binary sum 9/-0.9 : for a decimal sum Big/small: for the first or last value eg: =NPV(1e20,A1:K1)*1e20 returns the first non-blank value in the row. Or...in Excel 2007 (cse): =NPV(-0.9,,IFERROR(MID(A1,51-ROW(1:50),1)%,""))&"" extracts the numeric portion of a string such as "apple 123 banana 345 pear 567 orange 678" - 123345567678 "Peo Sjoblom" wrote: On Thursday, September 25, 2008 4:28 PM Peo Sjoblom wrote: Thanks for the info Lori, very interesting. I love the last one and I know how to get numbers from a string as long as they are in one place. -- Regards, Peo Sjoblom On Monday, July 26, 2010 2:52 AM Punnoose Mammen wrote: Can someone please help me with a excel work sheet formula for sum total of even number cells if the odd number cells value is 1 or 0. Example:1 if a1=1,a3=1,a5=0,a7=1,a9=0,a11=1, then a2+a4+a8+a12 Example:2 if a1=1,a3=1,a5=0,a7=1,a9=0,a11=1, then a6+a10 |
#13
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Have a read at JE McGimpsey's site for usage of double unary.
http://www.mcgimpsey.com/excel/formulae/doubleneg.html Gord Dibben MS Excel MVP On Wed, 23 Mar 2011 11:25:53 GMT, Vibhor Bansal wrote: Hi Mike, This formula help me also for sum of the products at alternate columns. I just wanna know the impact of '--' in a formula for better understanding... Thnx, Vibhor On Thursday, September 25, 2008 5:29 AM JohnBlackwel wrote: Folks, I'm trying to find a formula for summing the contents of alternate cells in a row? I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this? John Blackwell On Thursday, September 25, 2008 5:41 AM Mike wrote: John, =SUMPRODUCT(--(MOD(COLUMN(E23:KK23),2)=1),E23:KK23) Mike "John Blackwell" wrote: On Thursday, September 25, 2008 5:44 AM Ashish Mathur wrote: Hi, Please array enter (Ctrl+Shift+Enter) the following formula SUM(IF((MOD(COLUMN(E23:I23),2)<0),E23:I23)) What this formula does is that if the column number/2<0, then it sums up the numbers from those columns. -- Regards, Ashsih Mathur Microsoft Excel MVP www.ashishmathur.com "John Blackwell" wrote in message ... On Thursday, September 25, 2008 6:06 AM JohnBlackwel wrote: Fantastic Mike - thank you. Sorry to be a pain, but how do I sum the other cells - i.e. D23, F23, H23, J23, L23 etc etc, up to KK23? John "Mike H" wrote: On Thursday, September 25, 2008 6:13 AM Mike wrote: Hi, Glad I could help for d23 etc use this =SUMPRODUCT(--(MOD(COLUMN(D23:KK23),2)=0),D23:KK23) Note all Ive done is change the range and altered the modulus to zero. Columns D, F etc are even numbered so for D the formula days 2 mod 2 = 0 Mike "John Blackwell" wrote: On Thursday, September 25, 2008 10:31 AM HARSHAWARDHANSSHASTR wrote: Mike, What is the significance of -- in formula. Harshawardhan Shastri "Mike H" wrote: On Thursday, September 25, 2008 12:59 PM David Biddulph wrote: For an explanation of the double unary minus, see http://www.mcgimpsey.com/excel/formulae/doubleneg.html -- David Biddulph "HARSHAWARDHAN. S .SHASTRI" On Thursday, September 25, 2008 1:06 PM Lor wrote: You could also try these two: =SUM(NPV({0,-2},D23:K23))/2 =SUM(NPV({0,-2},,D23:K23))/2 "John Blackwell" wrote: On Thursday, September 25, 2008 1:17 PM Peo Sjoblom wrote: Clever. How do you find these Lori? -- Regards, Peo Sjoblom On Thursday, September 25, 2008 3:49 PM Lor wrote: Thanks Peo, i make them up :-) i figure there are many functions out there which can be put to good use as long as you're aware of the limitations. NPV is a good example - other useful values for rate a 1/-0.5: for a binary sum 9/-0.9 : for a decimal sum Big/small: for the first or last value eg: =NPV(1e20,A1:K1)*1e20 returns the first non-blank value in the row. Or...in Excel 2007 (cse): =NPV(-0.9,,IFERROR(MID(A1,51-ROW(1:50),1)%,""))&"" extracts the numeric portion of a string such as "apple 123 banana 345 pear 567 orange 678" - 123345567678 "Peo Sjoblom" wrote: On Thursday, September 25, 2008 4:28 PM Peo Sjoblom wrote: Thanks for the info Lori, very interesting. I love the last one and I know how to get numbers from a string as long as they are in one place. -- Regards, Peo Sjoblom On Monday, July 26, 2010 2:52 AM Punnoose Mammen wrote: Can someone please help me with a excel work sheet formula for sum total of even number cells if the odd number cells value is 1 or 0. Example:1 if a1=1,a3=1,a5=0,a7=1,a9=0,a11=1, then a2+a4+a8+a12 Example:2 if a1=1,a3=1,a5=0,a7=1,a9=0,a11=1, then a6+a10 |
#14
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Mar 23, 4:25*am, Vibhor Bansal wrote:
This formula help me also for sum of the products at alternate columns. I just wanna know the impact of '--' in a formula for better understanding. Presumably you are asking about a formula like: =SUMPRODUCT(--(MOD(COLUMN(D23:KK23),2)=0),D23:KK23) The double-negative (--) converts TRUE and FALSE to 1 and 0, which SUMPRODUCT requires to be effective in this context. Any arithmetic operation would do the same thing. For that reason, some people prefer to multiply by 1 (1*) instead of using double- negative. Also, for example: =SUMPRODUCT((A1:1003)*(A1:A100<=7)) counts the number of cells in A1:A100 that meets both conditions. The multiply (*) acts like AND; we cannot use AND in this context. No need for double-negative (--) in that context, although the following is equivalent: =SUMPRODUCT(--(A1:1003),--(A1:A100<=7)) Basically, use double-negative when there is no other arithmetic operations that would convert TRUE and FALSE to 1 and 0. |
#15
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Thursday, September 25, 2008 2:59:00 PM UTC+5:30, John Blackwell wrote:
Folks,I'm trying to find a formula for summing the contents of alternate cells in a row?I have a large workbook and want to calculate the contents of row 23 - i.e. E23, G23, I23, K23, M23 etc etc, up to KK23. Is there a simple formula for this?John Blackwell Jan Jan Feb Feb Total Total Sales Type 2013 2014 2013 2014 2013 2014 A 362 762 512 932 874 1,694 B 407 751 834 427 1,241 1,178 A 311 694 519 778 830 1,472 B 714 484 697 478 1,411 962 A 281 952 548 503 829 1,455 B 648 527 398 567 1,046 1,094 A 476 947 161 287 637 1,234 B 526 801 966 896 1,492 1,697 A 556 235 267 217 823 452 B 102 168 728 621 830 789 A Total 2,397 2,731 3,623 2,989 6,020 5,720 B Total 1,986 3,590 2,007 2,717 3,993 6,307 For Column Total of 2013: =SUM(IF((1-MOD(COLUMN($D22:$G22),2)<0),$D22:$G22)) For Column Total of 2014: =SUM(IF((MOD(COLUMN($D22:$G22),2)<0),$D22:$G22)) For Alternate Row Total of ROW of A for 2013: =SUM(IF((MOD(ROW(D$22:D$31),2)<0),D$22:D$31)) For Alternate Row Total of ROW of B for 2013: =SUM(IF((MOD(1+ROW(D$22:D$31),2)<0),D$22:D$31)) Copy the formula and define the range as desired and then press "CTRL+SHIFT+ENTER" Hope this is fine. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I 'CountIf' alternate cells? | Excel Discussion (Misc queries) | |||
Sum of Alternate Cells | Excel Discussion (Misc queries) | |||
Add alternate cells in column and sum | Excel Worksheet Functions | |||
Selecting alternate cells | Excel Worksheet Functions | |||
Delete a group of alternate cells | New Users to Excel |