Spellcheck doesn't show 'bad' cell, can't find misspelled word

boznian

Board Regular
Joined
Mar 25, 2003
Messages
167
Couldn't think of a better title to describe my issue. I am running SpellCheck against a sheet that is proteceted and has "freeze panes" enabled, but when I run s/c I unprotect the sheet as I always have. The sheet that I am checking has many proprietary and industry-specific words, acronyms, etc. that are not always obvious as to whether or not they are really misspelled and in some cells it is necessary to have the shortened (misspelled) version, others not because they will end up in public view. Because of this it is imperative that we be able to see the word in context, in whatever cell it resides. (eg "clr" might be correct in some cells but should be "clear" in others.)

This issue is new behaviour in 2010 as opposed to working fine in 2003:

When I run s/c the first word it comes up with is "clr". The problem is that the spreadsheet does not update or 'move' in the background to tell me where the cell is that has been found. When I close s/c and do a 'find' for "clr" there are no results (match case and match entire cell contents are both unchecked, search within sheet, values, by column or row). This happens for every item that is found by spellcheck.

How do I get spellcheck to show or display the cell in which it has found the misspelled word? Why won't the 'find' function find the same thing?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I wrote this a bit ago -- maybe you can adapt.

Code:
[FONT=Consolas][COLOR=#595959]Option Explicit[/COLOR][/FONT]
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
[FONT=Consolas][COLOR=#595959]Sub CheckSpellingInSelection()[/COLOR][/FONT]
[COLOR=#595959][FONT=Consolas]   CheckSpelling Selection.Cells[/FONT][/COLOR]
[FONT=Consolas][COLOR=#595959]End Sub[/COLOR][/FONT]
<o:p></o:p>
[FONT=Consolas][COLOR=#595959]Sub CheckSpelling(r As Range)[/COLOR][/FONT]
[COLOR=#595959][FONT=Consolas]   ' shg 2009[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]   ' formats misspelled words in r red[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]   Dim cell        As Range[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]   Dim asWd()      As String[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]   Dim iWd         As Long[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]   Dim iPos        As Long[/FONT][/COLOR]
<o:p></o:p>
[COLOR=#595959][FONT=Consolas]   With Application.SpellingOptions[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]       .IgnoreCaps = True[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]       .IgnoreFileNames = True[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]       .IgnoreMixedDigits = True[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]       ' .UserDict = ??     ' got one?[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]   End With[/FONT][/COLOR]
<o:p></o:p>
[COLOR=#595959][FONT=Consolas]   For Each cell In r[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]       With cell[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]           If Not .HasFormula And VarType(.Value) = vbString Then[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]               asWd = Split(Replace(.Value, Chr(160), " "), " ")[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]               iPos = 1[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]               .Font.ColorIndex = xlColorIndexAutomatic[/FONT][/COLOR]
<o:p></o:p>
[COLOR=#595959][FONT=Consolas]               For iWd = 0 To UBound(asWd)[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]                   If Not Application.CheckSpelling(Word:=asWd(iWd)) Then[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]                       .Characters(iPos, Len(asWd(iWd))).Font.ColorIndex = 3[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]                   End If[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]                   iPos = iPos + 1 + Len(asWd(iWd))[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]               Next iWd[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]           End If[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]       End With[/FONT][/COLOR]
[COLOR=#595959][FONT=Consolas]   Next cell[/FONT][/COLOR]
[FONT=Consolas][COLOR=#595959]End Sub[/COLOR][/FONT]
 
Upvote 0

Forum statistics

Threads
1,206,811
Messages
6,075,002
Members
446,113
Latest member
FadDak

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top