Auto Spell Check

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
thanks for reply,
but this technique work in one direction i.e. the format didn't release after correction, and I miss this part.
thanks
 
Upvote 0
Press ALT+F11. This starts the VBA (Visual Basic for Applications) editor.
In the project explorer panel on the left (if you don't see this panel press ctrl+R) rightclick your workbook and click insert->module
in the code panel that shows paste this
Code:
Option Explicit

Sub spellcheckAndReleaseFormat()
    Dim aCell   As Range
    
    For Each aCell In ActiveSheet.UsedRange
        If Not Application.CheckSpelling(aCell.Text) Then
            aCell.NumberFormat = "General"
        End If
    Next aCell
    Range("A1").Select
    Cells.CheckSpelling
End Sub

When you execute this macro it first sets all the cells that have spelling errors to format general and then initiates spell checking.
 
Upvote 0
  • Click the File tab, and then click Options.
  • Click Proofing.
  • Click to clear the Check spelling as you type check box.
  • Click to clear the Mark grammar errors as you type check box.
 
Upvote 0
First Time posting a reply the below code seemed to work for me to auto highlight cells with wrong spelling.
Kindly correct the code if needed. If you found the code useful. Request your help in solving other issue that i am facing Please check the link


Public frm As Integer
Public prve As Variant


Sub Worksheet_Change(ByVal Target As Range)
If Not frm = 0 Then
If Not Application.CheckSpelling(Word:=Target.Text) Then
Target.Interior.ColorIndex = 28
frm = 1
Else
frm = 0
prve = Target.Address
Exit Sub
End If
Else
Exit Sub
End If
End Sub


Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If frm = 0 Then Range(prve).ClearFormats
frm = 1
Exit Sub
End Sub
 
Upvote 0
First Time posting a reply the below code seemed to work for me to auto highlight cells with wrong spelling.
Kindly correct the code if needed. If you found the code useful. Request your help in solving other issue that i am facing Please check the link
To use the code Right click on the sheet name > click on view code > paste the below code.

Public frm As Integer
Public prve As Variant


Sub Worksheet_Change(ByVal Target As Range)
If Not frm = 0 Then
If Not Application.CheckSpelling(Word:=Target.Text) Then
Target.Interior.ColorIndex = 28
frm = 1
Else
frm = 0
prve = Target.Address
Exit Sub
End If
Else
Exit Sub
End If
End Sub


Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If frm = 0 Then Range(prve).ClearFormats
frm = 1
Exit Sub
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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