+ Reply to Thread
Results 1 to 5 of 5

Count instances of specific text within source data

  1. #1
    Registered User
    Join Date
    04-14-2014
    Location
    US
    MS-Off Ver
    Excel 2013
    Posts
    3

    Count instances of specific text within source data

    I need a formula that counts instances of this data (AB-1, AB-10, etc.)....

    Column A
    AB-1 Formula should give 2
    AB-10 Formula should give 1
    AB-2 Formula should give 1
    AB-20 Formula should give 1
    AF-1 Formula should give 1

    ....within this source data

    Column B
    Product AB-1 was created in 2016
    AB-1 is also blue
    AB-10 is green
    AB-2 is red
    AB-20 black
    AF-1 is yellow

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Count instances of specific text within source data

    @Anyone attempting to solve this:

    Since "AB-10" contains "AB-1" you'll probably find you get 3 for "AB-1", something to watch out for
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: Count instances of specific text within source data

    Is there always a space after "AB-X"? If so, that settles the issue Special-K mentionned

  4. #4
    Registered User
    Join Date
    04-14-2014
    Location
    US
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Count instances of specific text within source data

    No, there is not always a space after

  5. #5
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: Count instances of specific text within source data

    Then, I assume there at least cannot be a number after? Like "AB-10" followed by "312 times as blue" which would give "AB-10312 times as blue" is impossible to have?

    Also, is your code always "AB-" followed by a number?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need to parse cell and count instances of specific text
    By robbyvegas in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-20-2015, 11:39 PM
  2. Replies: 3
    Last Post: 08-04-2015, 08:03 AM
  3. How to count and report instances of specific text in a block of cells?
    By Rowlock in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-17-2014, 06:23 AM
  4. VBA Find all instances of a specific string and copying the number of count in cell
    By dilshandil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2013, 10:27 PM
  5. Replies: 6
    Last Post: 06-20-2012, 07:23 PM
  6. Function to count number of text instances
    By davelarue in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-18-2008, 04:39 AM
  7. Count text instances without defining a value?
    By tekkendork in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-08-2008, 12:42 PM

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