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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,425
Office Version
  1. 2019
Why don't you just use the Spellchecker on the Review tab?
 

Fishboy

Well-known Member
Joined
Feb 13, 2015
Messages
4,267
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.
 

Fishboy

Well-known Member
Joined
Feb 13, 2015
Messages
4,267
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:

Raymond Fernandez

New Member
Joined
Feb 6, 2015
Messages
11

ADVERTISEMENT

Unfortunately it does not correct the spelling mistakes, you have again select it from the applied validation
 

Fishboy

Well-known Member
Joined
Feb 13, 2015
Messages
4,267
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.
 

Raymond Fernandez

New Member
Joined
Feb 6, 2015
Messages
11
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
 

Fishboy

Well-known Member
Joined
Feb 13, 2015
Messages
4,267
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,951
Messages
5,834,547
Members
430,295
Latest member
amdis

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
Top