ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Sum of all even and odd numbers between two columns (https://www.excelbanter.com/new-users-excel/4875-sum-all-even-odd-numbers-between-two-columns.html)

Oz

Sum of all even and odd numbers between two columns
 
I have column "A," and "B," with random numbers listed. I need a formula to
add just the even numbers in column "A," and all the odd numbers in column
"B." I.E.(Range A1:A10 & B1:B10)

Help!

Oz

Max

One way

Put in C1:
=SUMPRODUCT(--(MOD(A1:A10,2)=0),A1:A10)
(add even numbers in col A)

Put in D1:
=SUMPRODUCT(--(MOD(B1:B10,2)=1),B1:B10)
(add odd numbers in col B)

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Oz" wrote in message
...
I have column "A," and "B," with random numbers listed. I need a formula

to
add just the even numbers in column "A," and all the odd numbers in column
"B." I.E.(Range A1:A10 & B1:B10)

Help!

Oz




Bob Phillips

=SUMIF(A1:A10,"0")+SUMIF(B1:B10,"<0")

--
HTH

Bob Phillips

"Oz" wrote in message
...
I have column "A," and "B," with random numbers listed. I need a formula

to
add just the even numbers in column "A," and all the odd numbers in column
"B." I.E.(Range A1:A10 & B1:B10)

Help!

Oz




Max

"Bob Phillips" wrote:
=SUMIF(A1:A10,"0")+SUMIF(B1:B10,"<0")

Not sure if this will return what the OP wants <g
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----



Bob Phillips

Hi Max,

Who knows what they actually want <vbg. We have to overlay our assumptions
all the time, and the OP will probably never tell us :-)

Bob

"Max" wrote in message
...
"Bob Phillips" wrote:
=SUMIF(A1:A10,"0")+SUMIF(B1:B10,"<0")

Not sure if this will return what the OP wants <g
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----





Max

.. and the OP will probably never tell us :-)
Those that don't *could* be shy, you know <g

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----



Lady Layla

Is the definition of even and odd numbers in England

Even -- those over 0 and Odd - those below 0?


"Bob Phillips" wrote in message
...
: =SUMIF(A1:A10,"0")+SUMIF(B1:B10,"<0")
:
: --
: HTH
:
: Bob Phillips
:
: "Oz" wrote in message
: ...
: I have column "A," and "B," with random numbers listed. I need a formula
: to
: add just the even numbers in column "A," and all the odd numbers in column
: "B." I.E.(Range A1:A10 & B1:B10)
:
: Help!
:
: Oz
:
:




All times are GMT +1. The time now is 07:53 AM.

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