VBA Code, How to change a specific word from Uppercase to Lowercase in Excel

1k Views Asked by At

I have an Excel spreadsheet of addresses. I want to change some words into lowercase (rather than the whole cell!). Those words are:

  • TH to th (street name)
  • 3RD to 3rd
  • 2ND to 2nd
  • 1ST to 1st

I know how to change the whole cell to lowercase or "Propercase" but I really need a function to change those improper uppercase to lowercase.

2

There are 2 best solutions below

0
On

If you just have those three options:

Function ChangeCase(cellinfo As String)

ChangeCase = Replace(Replace(Replace(cellinfo, "1ST", "1st"), "2ND", "2nd"), "3RD", "3rd")

End Function
1
On

You should just be able to do a find and replace like Holmes IV said. CTRL+F, then click the replace tab. The settings below should work. enter image description here