+ Reply to Thread
Results 1 to 10 of 10

ISODD/ISEVEN functions on range of cells

  1. #1
    Forum Contributor
    Join Date
    11-28-2008
    Location
    Reykjavík, Iceland
    MS-Off Ver
    Any of: 2003 & 2007
    Posts
    412

    ISODD/ISEVEN functions on range of cells

    Hi,

    I would like to sum all EVEN values in the range A1:A50 and found out that it is very easy task with:

    {=SUM(IF(MOD(A1:A50,2)=0,A1:A50))}

    I tried to investigate what the: {=ISEVEN(A1:A50)} will return and got an error.

    Is there a way to use ISEVEN to accomplish my request ?

    Thanks, Mike

    P.S.
    To all of you who wonder - this is not a High-School Exercise - it is purely my curiosity.
    Last edited by ElmerS; 06-25-2009 at 12:37 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: ISODD/ISEVEN functions on range of cells

    I think ISEVEN/ISODD does not work on ranges..only one cell reference allowed...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: ISODD/ISEVEN functions on range of cells

    ISODD and ISEVEN are not array-compatible.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor
    Join Date
    11-28-2008
    Location
    Reykjavík, Iceland
    MS-Off Ver
    Any of: 2003 & 2007
    Posts
    412

    Re: ISODD/ISEVEN functions on range of cells

    Thank you both,

    Elm

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: ISODD/ISEVEN functions on range of cells

    In fact, in Excel 2007 ISEVEN works with arrays (not ranges) so this formula works

    =SUMPRODUCT(ISEVEN(A1:A50+0)+0)

    although any blank cells would be deemed to be even so you might want to modify to:

    =SUMPRODUCT(ISEVEN(A1:A50+0)*(A1:A50<>""))

    ....there's also an EVEN function which works with array even in Excel 2003 so you can use a construction like EVEN(A1:A50)=A1:A50 to check for evenness too, but I'm not sure it's an improvement on MOD

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: ISODD/ISEVEN functions on range of cells

    dll, for whatever reason I had never come across EVEN before!

    would also make the additional point that ISEVEN/ISODD also require ATP activation pre-XL2007.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: ISODD/ISEVEN functions on range of cells

    in Excel 2007 ISEVEN works with arrays (not ranges) so this formula works
    It does indeed. I don't see it listed among the documented changes. Whatever prompted you to try?

  8. #8
    Forum Contributor
    Join Date
    11-28-2008
    Location
    Reykjavík, Iceland
    MS-Off Ver
    Any of: 2003 & 2007
    Posts
    412

    Re: ISODD/ISEVEN functions on range of cells

    Thank you all,

    Elm

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: ISODD/ISEVEN functions on range of cells

    Quote Originally Posted by shg View Post
    Whatever prompted you to try?
    I didn't initially. It was pointed out to me by "pgc01" over at MrExcel.....

  10. #10
    Registered User
    Join Date
    06-17-2020
    Location
    Lisbon, Portugal
    MS-Off Ver
    2016
    Posts
    5

    Re: ISODD/ISEVEN functions on range of cells

    This is a great comunity and you Guys are just fantastic!

    Thanks a lot for all the insights on this subject!


+ 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