+ Reply to Thread
Results 1 to 11 of 11

Sumproduct function returning error.

  1. #1
    Forum Contributor
    Join Date
    05-17-2010
    Location
    Nigeria, Owerri
    MS-Off Ver
    Excel 2007 and 2013
    Posts
    254

    Sumproduct function returning error.

    Good day. I have a file that's similar to the attached. I'm using sumproduct function to add values in column "I" based on their week number of the dates in column "H". The formular is returning error. What am I not doing right please?
    Attached Files Attached Files
    Last edited by [email protected]; 05-14-2019 at 05:41 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,444

    Re: Sumproduct function returning error.

    Try =SUMPRODUCT(--(WEEKNUM($H$3:$H$24,2)=1*RIGHT(A3,2)),$I$3:$I$24)
    The RIGHT function returns text whilst WEEKNUM returns a number
    Multiplyiing the RIGHT function with 1 coerces it to a real number
    Last edited by Pepe Le Mokko; 05-10-2019 at 11:52 AM.

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Sumproduct function returning error.

    Could you use a helper column?

    In column F >> =WEEKNUM(G3,2)

    In column B >> =IFERROR(VLOOKUP(SUBSTITUTE(A3,"Week","")+0,$F$3:$H$24,3,0),"")
    HTH
    Regards, Jeff

  4. #4
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Sumproduct function returning error.

    I moved the WEEKNUM Formula to Column I. so I had Col H with the date, col I with the weeknum and col J with the 1234 and then used this SUMIFS formula.

    =SUMIFS(J:J,I:I,RIGHT(A3,2)*1)

    Pepe; I tried that and still got a #Value error....thoughts?
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  5. #5
    Forum Contributor
    Join Date
    05-17-2010
    Location
    Nigeria, Owerri
    MS-Off Ver
    Excel 2007 and 2013
    Posts
    254

    Re: Sumproduct function returning error.

    I have tried all the suggested solutions and still get error. Maybe there's something I'm not getting right.

  6. #6
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Sumproduct function returning error.

    check out the attached....
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Sumproduct function returning error.

    WEEKNUM is one Excel formula that cannot accept an array as an argument, so you will definitely need a helper column. judgeh59's solution in post #4 worked for me.
    If someone helped achieve your solution, consider clicking "* Add Reputation" on their post.

    If your question has been answered, mark the thread as [SOLVED] using the Thread Tools menu at the top of the thread.

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Sumproduct function returning error.

    Quote Originally Posted by Melvosh View Post
    WEEKNUM is one Excel formula that cannot accept an array as an argument
    The inclusion of a unary plus operator is one way to coerce an array of returns from that function:

    =SUMPRODUCT(--(WEEKNUM(+$H$3:$H$24,2)=0+RIGHT(A3,2)),$I$3:$I$24)

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,444

    Re: Sumproduct function returning error.

    My bad.
    The solution I presented works perfectly in LibreOffice.
    Not so in Excel .(background use of the TYPE function for comparisons?)

  10. #10
    Forum Contributor
    Join Date
    05-17-2010
    Location
    Nigeria, Owerri
    MS-Off Ver
    Excel 2007 and 2013
    Posts
    254

    Re: Sumproduct function returning error.

    XOR LX formula works very well. Thanks all.

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Sumproduct function returning error.

    You're welcome!

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] SUMPRODUCT/IF/COUNTIFS formula returning a #DIV/0 error
    By Nate_from_Australia in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-28-2018, 02:04 AM
  2. Sumproduct formula returning #Value! error
    By brizmol1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-13-2014, 05:16 PM
  3. Sumproduct - returning error #Div/0! - Please help
    By wvnimal in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-30-2013, 09:41 AM
  4. [SOLVED] Sumproduct returning #Error
    By Knocknaboula in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-06-2013, 03:24 PM
  5. [SOLVED] SUMPRODUCT formula returning #NUM! error message
    By inneedofhelp1 in forum Excel General
    Replies: 5
    Last Post: 11-06-2012, 10:04 AM
  6. [SOLVED] Sumproduct formula is returning #value error
    By ensmith in forum Excel General
    Replies: 2
    Last Post: 06-27-2012, 09:56 PM
  7. [SOLVED] SUMPRODUCT formula returning #VALUE! error
    By Valerie in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-28-2006, 09:40 AM

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