I have rows with different strings of text that contains words that are abbreviated e.g. A1 = "Grw Option", B1 ="Grth Fund", C3 ="Grow Account" rather than "Growth Option", "Growth Fund", "Growth Account".
I have the list of different abbreviations down and what i need to replace them with.
However there are about 20 other words that have up to 5 forms of abbreviations, how i have written out the complete VBA code is extremely long.
I wondering is there a possible way to list multiple strings and replace it with a single string using only a single line of code.
I have used the Find & Replace function to replace each abbreviation of "Growth".
Sub ReplaceAbbr()
Dim ws As Worksheet
ws.Cells.Replace What:="Grw", Replacement:="Growth", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
ws.Cells.Replace What:="Grth", Replacement:="Growth", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
ws.Cells.Replace What:="Grow", Replacement:="Growth", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
End Sub
I am looking for a shorter alternative to writing this script.