Excelgoodies logo +44 (0)20 3769 3689

How to highlight cells with mis-spelled words using VBA?

 

The below code will check each cell from the selection and highlight the cell where is a misspelled word.

 

Sub HighlightMisspelledCells()

Dim rng As Range

For Each rng In ActiveSheet.UsedRange

If Not Application.CheckSpelling(word:=rng.Text) Then

rng.Style= "Bad" End If

Next rng

End Sub

 

Explore extensive Excel VBA Programming Course here and, learn to automate your routine Excel Reports, Tasks and Processes.

 

Happy Excelling
Team Excelgoodies

VBA & Python