+ Reply to Thread
Results 1 to 4 of 4

check if contains words

  1. #1
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    check if contains words

    Is VBA capable of checking whether a cell contains words rather than just text? so "CRB DFMT" would return False or 0 but "Check on Darron Tate" would return True or 4.

    eg:
    Please Login or Register  to view this content.
    etc...

    Maybe through the use of the spell-check dictionary?

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: check if contains words

    Checking within the current language is easier than checking several languages. Which do you need?

    Here's a function which does what you describe. You could combine this with another function which cycles through different languages and returns the first to get a match. Bear in mind, it might be possible to have a string which is written in one language, within which some words are also words in another language (fort is a very different word in French and English). You might get false matches with a language cycle.

    Please Login or Register  to view this content.
    Last edited by Cheeky Charlie; 04-03-2013 at 12:34 PM. Reason: Basic function
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  3. #3
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: check if contains words

    So I could write it as an in cell function even? That makes the language check redundant as it was only going to be used to set the text in a userform. It is intended for use on an index of documents to display the number of documents in a given language (preferably the users set language) from their titles.

  4. #4
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: check if contains words

    Yes, you can use functions like the above in cells or in VBA. It is demonstrated being used in VBA in my example. I don't see how that makes it redundant for setting language in a userform. I don't understand your third sentence, but in this scenario the standard is to ask the user their preferred language, rather than attempt to deduce it. Easier for you, not unpleasant for a user.

    Hope this helps.

+ 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