The following VBA can change word that is not in dictionary to RED:
[TABLE="width: 539"]
<tbody>[TR]
[TD="width: 539"]How to revise so that the word that is not in dictionary to be UNDERLINED?[/TD]
[/TR]
</tbody>[/TABLE]
Code:
[COLOR=#333333]Sub zz()
[/COLOR]<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">Dim ws As Worksheet, rng As Range, s$, w$
Set ws = ActiveSheet
For Each rng In ws.UsedRange
If rng.HasFormula Then GoSub Nextrng:
If Application.CheckSpelling(rng.Value) Then GoTo Nextrng:
s = " " & rng.Value
i = 2
While i < Len(s)
If Mid(s, i - 1, 1) = " " And Mid(s, i, 1) <> "" Then
j = InStr(i, s, " ") - 1
If j = -1 Then j = Len(s)
w = Mid(s, i, j - i + 1)
If Not Application.CheckSpelling(w) Then
rng.Characters(Start:=i - 1, Length:=j - i + 1).Font.Color = vbRed
End If
i = j + 1
End If
i = i + 1
Wend
Nextrng:
Next rng
</code>[COLOR=#333333]End Sub[/COLOR]
[TABLE="width: 539"]
<tbody>[TR]
[TD="width: 539"]How to revise so that the word that is not in dictionary to be UNDERLINED?[/TD]
[/TR]
</tbody>[/TABLE]