+ Reply to Thread
Results 1 to 4 of 4

Why is #VALUE! appearing

  1. #1
    Forum Contributor
    Join Date
    11-13-2010
    Location
    Warren, Michigan
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    307

    Why is #VALUE! appearing

    I'm looking to SUM the "odd" and "even" numbers.

    In this case below there should be 2 "odd" and 3 "even" numbers.

    N13 8
    O13 5
    P13 0
    Q13 7
    R13 4
    S13 <blank>

    The coding I'm using is:

    For "ODD" in cell T13:
    =SUMPRODUCT(--(MOD(N13:S13,2)=1))

    For "EVEN" in cell U13:
    =SUMPRODUCT(--(MOD(N13:S13,2)=0))-COUNTIF(N13:S13,"")

    This coding was working, now appearing is the terrible "#VALUE!" in both cells. The cell format is "General" on all cells.

    Again I cleared the cells and re-entered the coding – and still the same.

    Any suggestions???
    Last edited by khank; 04-09-2011 at 07:41 PM.

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Why is #VALUE! appearing

    Given the values you've described and the #VALUE! error result, I would check S13 carefully. Perhaps it contains an empty string?

    Feel free to attach the workbook for us to see?
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Why is #VALUE! appearing

    try array entered
    =SUMPRODUCT(--(MOD(IF($N$13:$S$13="",0,$N$13:$S$13),2)=1),--($N$13:$S$13<>"")) for odd and
    =SUMPRODUCT(--(MOD(IF($N$13:$S$13="",0,$N$13:$S$13),2)=0),--($N$13:$S$13<>"")) for even
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Contributor
    Join Date
    11-13-2010
    Location
    Warren, Michigan
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    307

    Re: Why is #VALUE! appearing

    It code works perfectly.

    Depending on the input that day sometimes I'll have a blank cell or two of the six - and on the other hand some days all six are filled.

    Thank you for the revised coding and Colin thanks for your input.

+ 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