+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Vlookup and sum similar data

Hybrid View

Ichigo Vlookup and sum similar data 09-14-2009, 10:29 PM
teylyn Re: Vlookup and sum similar... 09-14-2009, 10:45 PM
Ichigo Re: Vlookup and sum similar... 09-14-2009, 10:52 PM
teylyn Re: Vlookup and sum similar... 09-14-2009, 11:24 PM
Ichigo Re: Vlookup and sum similar... 09-15-2009, 12:02 AM
  1. #1
    Registered User
    Join Date
    03-06-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2010 and 2013
    Posts
    47

    Vlookup and sum similar data

    Dear members,

    I have a question on vlookup. I was following some previous thread, this link being one of them:
    http://www.excelforum.com/excel-gene...not-cells.html

    I have attached a sample of my question here. What if my data has similar region code but different product code. I want to sum up all data with code N1010 and 20050. My intended answer is 95 but it seems my formula is not accurate.

    Hope to get some help here.

    Thank you.
    Attached Files Attached Files

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

    Re: Vlookup and sum similar data

    Hi

    try

    =SUMPRODUCT(--(A5:A14="N1010"),--(B5:B14=20050),C5:C14)

    or, better, create a privot table from your data to analyse and sum up by different criteria. There's lots of information about pivot tables at www.contextures.com - once you get your head around the concept you wouldn't want to miss them!

    hth

  3. #3
    Registered User
    Join Date
    03-06-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2010 and 2013
    Posts
    47

    Re: Vlookup and sum similar data

    Thank you Teylyn,

    Can i ask what does the "--" symbol means in this formula? It seems if i delete one of it, the answer will become negative.

    Thanks again.

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

    Re: Vlookup and sum similar data

    It's called a double unary and converts TRUE or FALSE into 1 or 0 respectively.

    (A5:A14="N1010") in the formula will return something like

    {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,FALSE}

    with the -- in front, it will convert to

    {1,1,1,1,0,0,0}

    which can then be used for calculations, wherease TRUE or FALSE can not.

  5. #5
    Registered User
    Join Date
    03-06-2009
    Location
    Malaysia
    MS-Off Ver
    Excel 2010 and 2013
    Posts
    47

    Smile Re: Vlookup and sum similar data

    Hi Teylyn,

    Thank you for the explanation.

+ 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