+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Looking up a text string within a database

  1. #1
    Registered User
    Join Date
    06-08-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Looking up a text string within a database

    Hello All
    I have a list of items (alpha numeric text) which will be contained within other items in a seperate database. Is there a way i can lookup and count how many time each one occurs? I have been trying various functions but have hit a brick wall....

    For example i am trying to count how many times "ABC123" occurs within a list like the one shown below...

    ITEM
    abc123xyz
    cba123xyz
    123abcxyz
    123cbaxyz
    xyzabc123
    111abc123
    222abc123

    any help will be much appreciated as my head hurts from bouncing of my desk...

    Many Thanks

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Looking up a text string within a database

    =countif($A$1:$A$7;$A1)

    and copy down.

  3. #3
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Looking up a text string within a database

    Hello
    I would try something like:

    =COUNTIF(A1:A7,"*"&"ABC123"&"*")

    or if you want it case sensitive:

    =SUMPRODUCT((ISNUMBER(FIND("abc123",A1:A7)))*1)

    I get the answer 4.

  4. #4
    Registered User
    Join Date
    06-08-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Looking up a text string within a database

    Thanks for the reply but it does not work on my database. in the database i am looking up ABC123 the ABC123 does not appear in "A1" of the database - sorry i should have clarified

  5. #5
    Registered User
    Join Date
    06-08-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Looking up a text string within a database

    Hi DBY/Anyone -
    Sorry i have been checking the results and it is not working correctly i'm afraid as its not returning the correct amount of results.

    The "ABC123" i am looking up in the 45K item databse is always located at the begning of the text string within the 45K items -does this make a difference?

    Many Thanks
    Last edited by redave; 06-11-2012 at 06:51 AM. Reason: unfortunately solution supplied has not worked

+ 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