+ Reply to Thread
Results 1 to 4 of 4

How do I get the sum of only odd/even numbered cells in a column?

Hybrid View

  1. #1
    Steve E
    Guest

    How do I get the sum of only odd/even numbered cells in a column?

    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

  2. #2
    Peo Sjoblom
    Guest

    Re: How do I get the sum of only odd/even numbered cells in a column?

    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




  3. #3
    Bob Phillips
    Guest

    Re: How do I get the sum of only odd/even numbered cells in a column?

    =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




  4. #4
    Ron Rosenfeld
    Guest

    Re: How do I get the sum of only odd/even numbered cells in a column?

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1