Formula for spelling errors

ChrisFoster

Active Member
Joined
Jun 21, 2019
Messages
256
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a document with tens of thousands of rows of data. I need to check the sheet for spelling errors as they are all SMS campaigns that staff want to send to customers in a professional capacity.
F7 highlights each error but this is not sustainable when I have so much data.

Is there a formula I can use to check data in column B for spelling errors and simply return True/False so I can easily filter the data?

Kind regards,

Chris
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi ChrisFoster,

You could try something like this...
Book1
AB
1dog
2dagFALSE
3cat
4ctaFALSE
5horsey
6horses
7horseeFALSE
8goat
9gaotFALSE
Sheet1

VBA Code:
 Sub SpellCheckResults()

    Dim blnCorrect As Boolean
    Dim strCheck As String
    Dim cell As Range

    For Each cell In Intersect(Range("A1:A10"), ActiveSheet.UsedRange)
        strCheck = cell.Value
        blnCorrect = Application.CheckSpelling(strCheck)
        If Not blnCorrect Then
            cell.Offset(0, 1).Value = blnCorrect
        End If
    Next

End Sub

Hope that helps,

Doug
 
Upvote 0
Hi ChrisFoster,

You could try something like this...
Book1
AB
1dog
2dagFALSE
3cat
4ctaFALSE
5horsey
6horses
7horseeFALSE
8goat
9gaotFALSE
Sheet1

VBA Code:
 Sub SpellCheckResults()

    Dim blnCorrect As Boolean
    Dim strCheck As String
    Dim cell As Range

    For Each cell In Intersect(Range("A1:A10"), ActiveSheet.UsedRange)
        strCheck = cell.Value
        blnCorrect = Application.CheckSpelling(strCheck)
        If Not blnCorrect Then
            cell.Offset(0, 1).Value = blnCorrect
        End If
    Next

End Sub

Hope that helps,

Doug
Thanks Doug, that brings back a run time error though (type mismatch) when it gets to "blnCorrect = Application.CheckSpelling(strCheck)".
 
Upvote 0
Weird, I testing on strings of multiple words and it seems to work.
 
Upvote 0
Type mismatch would normally be an error where the type being returned (boolean in this case) does not match the type specified for the variable.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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