+ Reply to Thread
Results 1 to 4 of 4

MATCH on partial strings

  1. #1
    Valued Forum Contributor ffffloyd's Avatar
    Join Date
    05-20-2008
    Location
    Melbourne, VIC, Australia
    MS-Off Ver
    Office 365
    Posts
    243

    MATCH on partial strings

    I have a series of lines, each one identified by a keyword (or phrase) that is the first part of the string on that line. The keywords are not necessarily of the same length though.

    I'd like to hold the keywords in a list and identify each line according to which keyword the leftmost characters of the line match. Ideally, something like the MATCH function would do this, but it only matches strings of a fixed length.

    For example, let's say I have a line like:

    TEXT created by Blah-de-blah on 27/05/2008 containing blah-de-blah-de-blah

    My list of keywords might be:
    ACCESS
    BASIC
    CSV
    DATABASE
    JAVASCRIPT
    PROJECT
    RICH TEXT
    SPREADSHEET
    TEXT
    WORD

    At the moment I am able to do a MATCH using the first three characters of the line with the first three characters of each list element. That works, but I'd like to build something more reliable and arbitrary for the day when list elements cannot be uniquely identified by the first three characters.

    Does anyone have any recommendations?

    Thanks in advance.

  2. #2
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Not sure if I undrstand exactly what you are after but maybe the attached will help - the only limitation is that it only works for single words.
    Attached Files Attached Files
    Ed
    _____________________________
    Always learning, but never enough!
    _____________________________

  3. #3
    Valued Forum Contributor ffffloyd's Avatar
    Join Date
    05-20-2008
    Location
    Melbourne, VIC, Australia
    MS-Off Ver
    Office 365
    Posts
    243
    Hi Ed. Thanks for that. I see what you've done; taken the first word by finding the first space. Mine's a bit more complicated than that, unfortunately, though you wouldn't know it from the example I gave, but you've given me some ideas so thanks again.

  4. #4
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    OK

    Feel free to post back if you need to

+ 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