I need help with the formula to sum up only the odd or even numbers in a
column. I appreciate any help that you can provide.
Thanks,
Steve
I need help with the formula to sum up only the odd or even numbers in a
column. I appreciate any help that you can provide.
Thanks,
Steve
One way,
even
=SUMPRODUCT(--(MOD(A1:A10,2)=0),A1:A10)
odd
=SUMPRODUCT(--(MOD(A1:A10,2)=1),A1:A10)
--
Regards,
Peo Sjoblom
"Steve E" <Steve E@discussions.microsoft.com> wrote in message
news:0C3FAA07-2E0D-458B-ADFB-9EF27286C60C@microsoft.com...
> I need help with the formula to sum up only the odd or even numbers in a
> column. I appreciate any help that you can provide.
>
> Thanks,
> Steve
=SUM(IF(MOD(A1:A100,2)=0,A1:A100))
for even numbers, and
=SUM(IF(MOD(A1:A100,2)=1,A1:A100))
for odd numbers.
These are array formulae, so commit with Ctrl-Shift-Enter.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Steve E" <Steve E@discussions.microsoft.com> wrote in message
news:0C3FAA07-2E0D-458B-ADFB-9EF27286C60C@microsoft.com...
> I need help with the formula to sum up only the odd or even numbers in a
> column. I appreciate any help that you can provide.
>
> Thanks,
> Steve
On Thu, 3 Mar 2005 06:37:09 -0800, "Steve E" <Steve
E@discussions.microsoft.com> wrote:
>I need help with the formula to sum up only the odd or even numbers in a
>column. I appreciate any help that you can provide.
>
>Thanks,
>Steve
Odd: =SUMPRODUCT(MOD(A1:A25,2)*A1:A25)
Even: =SUM(A1:A25,-SUMPRODUCT(MOD(A1:A25,2)*A1:A25))
--ron
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks