+ Reply to Thread
Results 1 to 6 of 6

FIND subtext and SUM corresponding count

  1. #1
    Registered User
    Join Date
    06-02-2010
    Location
    Las Vegas, NV
    MS-Off Ver
    Excel 2007
    Posts
    5

    FIND subtext and SUM corresponding count

    Hello,

    I have the following data:

    A B
    01-EJ-01 1
    01-TC-02 2
    01-EJ-03 3
    01-BX-04 4
    01-EJ-04 5

    I am trying to find all cells in column A that contain "EJ". Then I need to sum their corresponding count in column B. In this example the answer should be 9. What is the function to do this????

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,081

    Re: FIND subtext and SUM corresponding count

    Here, try this:

    =SUMIF(A:A, "*EJ*", B:B)
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    06-02-2010
    Location
    Las Vegas, NV
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: FIND subtext and SUM corresponding count

    Quote Originally Posted by zbor View Post
    Here, try this:

    =SUMIF(A:A, "*EJ*", B:B)
    Thank you very much!!! Why did you put the ** in the formula?

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,081

    Re: FIND subtext and SUM corresponding count

    EJ will look for exact EJ
    *EJ will look for all words that ends with EJ
    *EJ* will look for all words that contains EJ

  5. #5
    Registered User
    Join Date
    06-02-2010
    Location
    Las Vegas, NV
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: FIND subtext and SUM corresponding count

    Awesome. Good to know.

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: FIND subtext and SUM corresponding count

    Possibly this

    Assuming your data begins in A2
    In C2
    Please Login or Register  to view this content.
    in B2
    Please Login or Register  to view this content.
    Drag/Fill both columns down

    Copy the result and paste special > values to D2 then remove duplicates from Colums D:E

    Hope this helps

    [EDIT]
    Or to add to zbors' suggestion
    Please Login or Register  to view this content.
    Last edited by Marcol; 09-21-2010 at 03:02 PM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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