+ Reply to Thread
Results 1 to 8 of 8

Sum of Cells in One Range Dependent on Specific Text in a Different Range

  1. #1
    Registered User
    Join Date
    01-11-2012
    Location
    Elgin, IL
    MS-Off Ver
    Excel 2006
    Posts
    29

    Sum of Cells in One Range Dependent on Specific Text in a Different Range

    I am currently using Excel 2010. I need to create a formula that will provide me with a a total of the numbers in the cells in one range that meet the criteria of specific text in a different range. Range X contains the specific text and Range Y contains the numbers that need to be added together if they match the text in Range X.
    I tried using SUMPRODUCT as follows but was not successful:
    =SUMPRODUCT((RANGE X,"TEXT")*(RANGE Y,"=>1"))
    =SUMPRODUCT((RANGE X,"TEXT")*(RANGE Y, =>1))

    I'd appreciate any suggestions.

    Thanks,
    MLCall

  2. #2
    Registered User
    Join Date
    07-25-2012
    Location
    Lisbon
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Sum of Cells in One Range Dependent on Specific Text in a Different Range

    Hi can you provide a file with an example, it would be easier to understand.
    Thanks

  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: Sum of Cells in One Range Dependent on Specific Text in a Different Range

    =SUMPRODUCT((B1:B10="TEXT")*(C1:C10>=1))
    but you could use countifs
    =COUNTIFS(B1:B10,"text",C1:C10,">=1")
    mind you this is sum so
    =SUMPRODUCT((B1:B10="TEXT")*(C1:C10>=1),c1:c10)
    or
    =SUMIFS(C1:C10,B1:B10,"text",C1:C10,">=1")
    Last edited by martindwilson; 07-26-2012 at 11:54 AM.
    "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
    01-24-2011
    Location
    Sheppey
    MS-Off Ver
    Excel 2010
    Posts
    239

    Re: Sum of Cells in One Range Dependent on Specific Text in a Different Range

    Try - =SUMIF(X:X,"TEXT",Y:Y)

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

    Re: Sum of Cells in One Range Dependent on Specific Text in a Different Range

    how will sumif work like that? it doesn't distinguish >=1

  6. #6
    Forum Contributor
    Join Date
    01-24-2011
    Location
    Sheppey
    MS-Off Ver
    Excel 2010
    Posts
    239

    Re: Sum of Cells in One Range Dependent on Specific Text in a Different Range

    Martin you are correct. I was trying to keep it simple and based the formula on the criteria as requested in the text.

  7. #7
    Registered User
    Join Date
    01-11-2012
    Location
    Elgin, IL
    MS-Off Ver
    Excel 2006
    Posts
    29

    Re: Sum of Cells in One Range Dependent on Specific Text in a Different Range

    I tried the SUMIFS version and it worked. Thanks very much.

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Sum of Cells in One Range Dependent on Specific Text in a Different Range

    @ MLCall

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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