+ Reply to Thread
Results 1 to 6 of 6

sumifs returning #value when criteria field is based on vlookup from external source

Hybrid View

Lithium78 sumifs returning #value when... 05-31-2010, 06:34 PM
teylyn Re: sumifs returning #value... 05-31-2010, 06:39 PM
daddylonglegs Re: sumifs returning #value... 05-31-2010, 06:43 PM
Lithium78 Re: sumifs returning #value... 05-31-2010, 07:15 PM
daddylonglegs Re: sumifs returning #value... 05-31-2010, 07:24 PM
Lithium78 Re: sumifs returning #value... 05-31-2010, 07:38 PM
  1. #1
    Registered User
    Join Date
    02-18-2010
    Location
    Indianapolis, Indiana
    MS-Off Ver
    Excel 2007
    Posts
    47

    sumifs returning #value when criteria field is based on vlookup from external source

    My sumifs function (excel 07) is returning #value. The only reason I can think of is because one of the fields containing sumif criteria has contains a formula with a vlookup to an external data source.

    Am I crazy or does SUMIFS not allow external data? Is there a workaround for this?

    Basically column B contains a product code that is looked up and column E contains the region the product was sold in. I want to sum column C if B = "AB78" and E= "IN"

    If I copy and paste values the formula works fine.. but I really need to figure out a formula that works without this step.

    Thank you in advance for any assistance you can provide!

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: sumifs returning #value when criteria field is based on vlookup from external sou

    Hello Lithium

    Sumifs works only with open workbooks, so if you nest a Vlookup to an external source, this might be an issue. As a workaround, you could have the Vlookup to the external workbook in a different cell and refer Sumifs to that cell instead.

    Or, open the external workbook.

    cheers

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,697

    Re: sumifs returning #value when criteria field is based on vlookup from external sou

    ....or you could use SUMPRODUCT instead, that will allow you to refer to a closed workbook. What formula are you using?

  4. #4
    Registered User
    Join Date
    02-18-2010
    Location
    Indianapolis, Indiana
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: sumifs returning #value when criteria field is based on vlookup from external sou

    =sumifs(c25:c100,A:A,"AB78",E:E,"IN")

    I'm doing this from memory, so if the formula looks wrong hopefully you can get the jist of what I'm doing.

    The sum values are in C25:C100... only want to sum if the value is "AB78" in column A and "IN" in column E.

    Just so I'm clear on how sumifs works... if I do the product code vlookup in a separate cell (lets say column G) and I change the formula in A to say =G1 the sumifs would work properly?

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

    Re: sumifs returning #value when criteria field is based on vlookup from external sou

    That formula returns #VALUE because the ranges don't match, you need it to be like this

    =SUMIFS(C25:C100,A25:A100,"AB78",E25:E100,"IN")

    If that doesn't fix it and you do have issues referencing closed workbooks then you could try changing to SUMPRODUCT, i.e.

    =SUMPRODUCT(C25:C100,(A25:A100="AB78")+0,(E25:E100="IN")+0)

  6. #6
    Registered User
    Join Date
    02-18-2010
    Location
    Indianapolis, Indiana
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: sumifs returning #value when criteria field is based on vlookup from external sou

    Quote Originally Posted by daddylonglegs View Post
    That formula returns #VALUE because the ranges don't match, you need it to be like this

    =SUMIFS(C25:C100,A25:A100,"AB78",E25:E100,"IN")

    If that doesn't fix it and you do have issues referencing closed workbooks then you could try changing to SUMPRODUCT, i.e.

    =SUMPRODUCT(C25:C100,(A25:A100="AB78")+0,(E25:E100="IN")+0)
    Thanks, I think the sumproduct will work.

    The A25:a100 fields contain a Vlookup to our product data sheet... so the results of that lookup are what I am doing my query against.

    I appreciate the tip on sumproduct... I wasn't sure how to go about doing this but the +0 makes sense!

+ 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