+ Reply to Thread
Results 1 to 5 of 5

Find Cells That Contain Specific Text, Then Add Numbers In Adjacent Column

  1. #1
    Registered User
    Join Date
    03-09-2009
    Location
    Rochester, NY, USA
    MS-Off Ver
    Excel 2007
    Posts
    25

    Find Cells That Contain Specific Text, Then Add Numbers In Adjacent Column

    I have data in the following format. Double line break signifies a new column.

    Text String || Number
    c2-ag-1 || 3
    c43-ag-4 || 2
    c55-ag-1 || 5
    c2-ag-3 || 1
    c55-ag-2 || 4

    How would I write a formula that outputs the following.

    If contains:

    c2 || 4
    c43 || 2
    c55 || 9
    Last edited by jessekanclerz; 05-12-2011 at 04:38 PM.

  2. #2
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: Find Cells That Contain Specific Text, Then Add Numbers In Adjacent Column

    Dont really follow your example. How does - c2-ag-1 || 3 become -c2 || 4 ?

  3. #3
    Registered User
    Join Date
    03-09-2009
    Location
    Rochester, NY, USA
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Find Cells That Contain Specific Text, Then Add Numbers In Adjacent Column

    The formula looks for the string of text before the first hyphen, then adds the numbers in column B that contain the same characters.

    So there's 2 C2's therefore 3 + 1 = 4

    So there's 2 C55's therefore 4 + 5 = 9

    So there's 1 C43 therefore = 2

  4. #4
    Forum Contributor
    Join Date
    08-30-2007
    Location
    Vancouver, B.C.
    Posts
    149

    Re: Find Cells That Contain Specific Text, Then Add Numbers In Adjacent Column

    Please see attached
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-09-2009
    Location
    Rochester, NY, USA
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Find Cells That Contain Specific Text, Then Add Numbers In Adjacent Column

    Thanks lazyme. Had to modify the formula slightly but it's working.

    =SUMIF(A:A,"*"&D2&"*",B:B)

+ 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