+ Reply to Thread
Results 1 to 4 of 4

Thread: Two same lookup values not adding

  1. #1
    Registered User
    Join Date
    07-28-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Two same lookup values not adding

    Hi all,

    I think this is the last issue that will make this formula perfect for what I need. When the SAME lookup value appears more than once, it does not add up all of the values in the array range. For example:

    A2 = Red

    F5 = Red, Q5 = 2
    F6 = Blue, Q6 = 4
    F7 = Yellow, Q7 = 3
    F8 = Red, Q8 = 5

    The formula only recognizes the Red in F5 and gives me a value of 2. What I need for it to do is add up both Q5 and Q8 because Red shows up in F5 and F8, to give me a total sum of 7. Thoughts?? Here's the formula:

    =IFERROR(INDEX($Q$5:$Q$13,(MATCH(A2,$F$5:$F$13,0))),0)

    I'm so close! Thanks in advance!
    JB

  2. #2
    Forum Guru Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    2003, 2007 and 2010
    Posts
    1,207

    Re: Two same lookup values not adding

    Try this:
     =SUMIF(F5:F8,A2,Q5:Q8)
    Hope that helps,

    Colin

    RAD Excel Blog

    Other tutorials:
    Array Formulas | Deleting Rows with VBA

  3. #3
    Registered User
    Join Date
    07-28-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Two same lookup values not adding

    Thanks for that. Do you have any suggestions where to incorporate that in the existing formula I have?

  4. #4
    Forum Guru Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    2003, 2007 and 2010
    Posts
    1,207

    Re: Two same lookup values not adding

    No incorporation required. It calculates the sum all on its own.
    Hope that helps,

    Colin

    RAD Excel Blog

    Other tutorials:
    Array Formulas | Deleting Rows with VBA

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0