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

Leave a Reply

Your email address will not be published. Required fields are marked *