Need a vba code for checking spellings and replacing it with the correct word

Raymond Fernandez

New Member
Joined
Feb 6, 2015
Messages
11
Need a vba code for checking spellings and replacing it with the correct word.

I have four words in column N one below the other for example
Application
Infrastructure
Database
Data

What I want is if the spelling is incorrect for example,
Applisation
Infrustructure
Databse
Dala

It could be anything cause of typo error then it should automatically change to the correct word as mentioned above.

Can somebody please help me
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Need a vba code for checking spellings and replacing it with the correct word.

I have four words in column N one below the other for example
Application
Infrastructure
Database
Data

What I want is if the spelling is incorrect for example,
Applisation
Infrustructure
Databse
Dala

It could be anything cause of typo error then it should automatically change to the correct word as mentioned above.

Can somebody please help me
Hi Raymond,

For automatically correcting a word you are probably limited to calling or using the SpellCheck feature, and even then Excel will only flag the incorrectly spelled words by itself and you would have to tell it which of the possible suggestions was the correct one.

Instead perhaps the simplest way of handling this would be to make your column N a data validated column where users can only select from those 4 values. These could be selected from directly from a drop-down menu in each cell if you prefer, but at the very least it would not allow values that are not one of those 4 words.

If this is a possible option let me know and I can help talk you through setting it up.
 
Upvote 0
That's not really an option and that would take up a lot of time cause I have around 400 rows to be entered :(
Select all rows you need to apply it to at once-->Data-->Data Validation-->Data Validation-->Change "Allow" to "List"-->Copy this into the "Source" box: Application,Infrastructure,Database,Data-->Click OK.

Job done in 60 seconds or less.
 
Last edited:
Upvote 0
Unfortunately it does not correct the spelling mistakes, you have again select it from the applied validation
Then I do not think it can be done as you describe.

Even if you use VBA to have the spellchecker run it won't know what word to correct it to without user input of some sort. Excel is many things but it is not psychic. Surely having a user select from the list instead of typing it wrong in the first place would save time and a multitude of key presses on the keyboard.
 
Upvote 0
Cool.. if that is not an option.. I guess ill have to live with it.

Thanks a lot for trying to help me with this :)

Cheers
No problem. Sorry I couldn't be of any real help.

If it turns out I am wrong (which happens far more often than I would like!), perhaps one of the gurus may swoop in with a solution I am unaware of.
 
Upvote 0

Forum statistics

Threads
1,213,487
Messages
6,113,937
Members
448,534
Latest member
benefuexx

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