Excel: Macro Error Using SPELLING.CHECK() on Blank CellsID: Q83493
|
In Microsoft Excel, a reference to a blank cell in the word_text argument of SPELLING.CHECK() will result in a Macro Error.
Microsoft Excel versions 4.0 and later provide a macro function that allows
non-interactive spell checking. The function, SPELLING.CHECK(), takes
three arguments; a word or text argument, the name of a custom
dictionary and whether or not to ignore uppercase letters. If the word
text argument is a reference to a blank cell you will receive a macro
error when this function is called.
To use SPELLING.CHECK() without getting an error on blank cells, use a
FOR.CELL() loop as in the following example. Note that the
skip_blanks argument to FOR.CELL() is set to TRUE.
This function macro simply returns true if all the words in the given
range are spelled correctly and false if any misspelled words are
found.
A1: SpellCheck
A2: =RESULT(4)
A3: =ARGUMENT("Range",8)
A4: =FOR.CELL("Current",Range,TRUE)
A5: = IF(NOT(SPELLING.CHECK(Current)),RETURN(FALSE))
A6: =NEXT()
A7: =RETURN(TRUE)
"Microsoft Excel Function Reference," version 4.0, pages 416-417
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: March 24, 1999