ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Adding Only Positive Numbers (https://www.excelbanter.com/excel-discussion-misc-queries/118875-adding-only-positive-numbers.html)

[email protected]

Adding Only Positive Numbers
 
I have been looking around and found solutions to adding only positive
numbers in a range however, if I am trying to add numbers that are not
next to eachother but actually every other cell, everytime that I
select the 4 cells a "," is added between each messing up my formual.
ie. =SUMIF(H3,J3,L3,N3,0), how would I do that only adding the numbers
that are positive?

Thanks for the help, hopefully I explained it good enough.


Bob Phillips

Adding Only Positive Numbers
 
=SUMPRODUCT(--(MOD(COLUMN(H3:N3),2)=0),--(H3:N30),H3:N3)

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

wrote in message
oups.com...
I have been looking around and found solutions to adding only positive
numbers in a range however, if I am trying to add numbers that are not
next to eachother but actually every other cell, everytime that I
select the 4 cells a "," is added between each messing up my formual.
ie. =SUMIF(H3,J3,L3,N3,0), how would I do that only adding the numbers
that are positive?

Thanks for the help, hopefully I explained it good enough.




Dave F

Adding Only Positive Numbers
 
=SUMIF(A1:A10,"0")
--
Brevity is the soul of wit.


" wrote:

I have been looking around and found solutions to adding only positive
numbers in a range however, if I am trying to add numbers that are not
next to eachother but actually every other cell, everytime that I
select the 4 cells a "," is added between each messing up my formual.
ie. =SUMIF(H3,J3,L3,N3,0), how would I do that only adding the numbers
that are positive?

Thanks for the help, hopefully I explained it good enough.



CLR

Adding Only Positive Numbers
 
=SUM(IF(H30,H3,0)+IF(J30,J3,0)+IF(L30,L3,0)+IF( N30,N3,0))

Vaya con Dios,
Chuck, CABGx3




" wrote:

I have been looking around and found solutions to adding only positive
numbers in a range however, if I am trying to add numbers that are not
next to eachother but actually every other cell, everytime that I
select the 4 cells a "," is added between each messing up my formual.
ie. =SUMIF(H3,J3,L3,N3,0), how would I do that only adding the numbers
that are positive?

Thanks for the help, hopefully I explained it good enough.




All times are GMT +1. The time now is 01:23 PM.

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