+ Reply to Thread
Results 1 to 3 of 3

How to set repeated words as misspelling?

  1. #1
    Forum Contributor
    Join Date
    09-18-2011
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    375

    How to set repeated words as misspelling?

    The VBA can mark words that is not in dictionary to red:


    Please Login or Register  to view this content.
    How to revise VBA so that it match with Excel check spelling function so that
    the following can also be marked red:

    PPP PPP (repeated words)
    ABC (all UPPER words)
    P/S p*s (with character /*? etc.)

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: How to set repeated words as misspelling?

    Because you are using CheckSpelling for individual words, it will not flag repeated words, only check whether the word is in a dictionary. You have to write the logic yourself.

    Notes:
    Your code flags cells with numeric values as spelling errors.
    It will cause a runtime error if you spellcheck any cells having an error (like #VALUE).
    It does not recognize P/S or p*s as words because \w+ matches consecutive word characters and ? and * are not word characters. It will highlight only part of such a word red.

    Please Login or Register  to view this content.
    Also I recommend you explicitly declare all variables as a data type.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    09-18-2011
    Location
    Hong Kong
    MS-Off Ver
    Office 365
    Posts
    375

    Re: How to set repeated words as misspelling?

    Thanks 6StringJazzer for suggestion.

+ 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] specific words repeated in a cell
    By ba13 in forum Excel General
    Replies: 7
    Last Post: 04-20-2016, 02:14 PM
  2. Just wan't a column to complete repeated words ;(
    By DumDumDizzle84 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 03-30-2016, 12:33 AM
  3. Counting Repeated Words in a Cell
    By aalbers in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-17-2013, 05:32 AM
  4. [SOLVED] Delete repeated words in every cells in a Range
    By mmtoure in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-14-2013, 07:02 AM
  5. Return repeated words
    By Stews in forum Excel General
    Replies: 1
    Last Post: 05-15-2013, 06:16 AM
  6. Count non-repeated words in cell
    By mxc668 in forum Excel General
    Replies: 10
    Last Post: 10-14-2009, 06:04 PM
  7. [SOLVED] Repeated words in spellcheck
    By Kushami in forum Excel General
    Replies: 1
    Last Post: 05-17-2006, 10:55 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