+ Reply to Thread
Results 1 to 13 of 13

Exclude some words from CheckSpelling

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Exclude some words from CheckSpelling

    Hello everyone
    I got this code from another thread
    Please Login or Register  to view this content.
    How can I exclude specific words from checking ..?
    Say I would store those words to exclude in an array
    x=Array("CLng","DoesNot")

    Another point to deal with compound words as separate words .. example "FileSystemObject"
    File starts with capital letter and System starts with capital letter and Object is the same >> so this word would be manipulated as three words not just one during CheckSpelling
    Last edited by YasserKhalil; 10-15-2018 at 03:49 PM.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Exclude some words from CheckSpelling

    Any help in this topic please?

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Exclude some words from CheckSpelling

    Can you give more details about your data layout:
    Where is the dictionnary you want to use, the one to exclude words, the words to check.
    - Battle without fear gives no glory - Just try

  4. #4
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241
    Quote Originally Posted by YasserKhalil View Post
    Hello everyone
    I got this code from another thread
    Please Login or Register  to view this content.
    How can I exclude specific words from checking ..?
    Say I would store those words to exclude in an array
    x=Array("CLng","DoesNot")

    Another point to deal with compound words as separate words .. example "FileSystemObject"
    File starts with capital letter and System starts with capital letter and Object is the same >> so this word would be manipulated as three words not just one during CheckSpelling
    In keyboarf F7
    Using box
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Exclude some words from CheckSpelling

    Thanks a lot for reply
    In data you would put some sentences in A1:A & last row ...
    Put some incorrect words within those sentences and test the code in first post ...
    Now include some words such as Clng in those sentences and notice the result .. you will find "No" which means there is a misspelled word
    I need to exclude such words "Clng" from the checking process

    There is no dictionary .. I will rely on the built-in feature Application.CheckSpelling

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Exclude some words from CheckSpelling

    I don't have time to dig into it, but this link looks like you would be able to add words to ignore to a custom dictionary.
    https://docs.microsoft.com/en-us/off...tions.userdict
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Exclude some words from CheckSpelling

    Thanks a lot for the link. It helps a lot in searching for the issue
    I have found this code for Kenneth Hobson that adds words to the custom.dic which allows to skip the desired words from checking
    Here's the link of code
    https://www.ozgrid.com/forum/forum/h...nary-using-vba

    Please Login or Register  to view this content.
    Hope to deal with arrays of words and make the code more concise so as to be able to use it in flexible way

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Exclude some words from CheckSpelling

    Any help in this topic ..

  9. #9
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    995

    Re: Exclude some words from CheckSpelling

    I modified Hobson's code so you can use an array.
    Note: make sure you are using a custom dic for your spellcheck.

    Please Login or Register  to view this content.

  10. #10
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Exclude some words from CheckSpelling

    @Akuini That's really Awesome. Thanks a lot for great help

    One last point .. how can we deal with compound words that are both true
    example : 'FileSystemObject' >> this string appears as an error for checkspelling ...
    I don't want in that case to add to the custom dictionary but to deal with such cases separately .. of course those compound words begins with capital letters at each word
    so if a cell has this string "This is FileSystemObject" the usual code would return Yes as this 'FileSystemObject' is considered wrong ...and I need to make it return "No" ..
    Hope it is clear as for this point

  11. #11
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    995

    Re: Exclude some words from CheckSpelling

    Quote Originally Posted by YasserKhalil View Post
    @Akuini That's really Awesome. Thanks a lot for great help

    One last point .. how can we deal with compound words that are both true
    example : 'FileSystemObject' >> this string appears as an error for checkspelling ...
    I don't want in that case to add to the custom dictionary but to deal with such cases separately .. of course those compound words begins with capital letters at each word
    so if a cell has this string "This is FileSystemObject" the usual code would return Yes as this 'FileSystemObject' is considered wrong ...and I need to make it return "No" ..
    Hope it is clear as for this point
    Sorry, I don't know how to do that.

  12. #12
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Exclude some words from CheckSpelling

    No sorry. You have done great job
    Waiting for other ideas about this point ..

  13. #13
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Exclude some words from CheckSpelling

    I tried the following UDF but not very accurate
    Please Login or Register  to view this content.
    I need to check the validity of the split parts if they are correct in spelling or not
    In this example "U" and "D" and "F" are split but they are invalid words

+ 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. [SOLVED] exclude certain words from a COUNTIFS formula
    By R.Sloan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-26-2017, 03:40 AM
  2. Adapting Macro to Include key words and not exclude
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-01-2014, 12:22 PM
  3. To Call All Value Exclude value consist of special words
    By cyee in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-27-2013, 06:12 AM
  4. Find Strings that exclude certain words
    By Mac_Ro in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-16-2013, 08:56 AM
  5. Exclude words from a formula
    By daniel.thomas10 in forum Excel General
    Replies: 2
    Last Post: 11-22-2010, 03:31 PM
  6. Sort and exclude certain words
    By jds217 in forum Excel General
    Replies: 2
    Last Post: 11-07-2005, 08:40 AM
  7. CheckSpelling a Textbox
    By Stuart in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-19-2005, 03:07 AM

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