Convert text to upper case

Just a small post because this really annoyed me today when I had to use excel for the first time in a year. I had a client that used an import tool to import data into a database. Well for the import tools API the database column names had to be in upper case. Because it has been years since I have really done anything in excel, come to find out converting to upper case was not an option. So to solve this you can do one of those things:

1. Use the function =UPPER(A1) which would work all fine if this was a new file I was building from scratch.

2. Build a macro.

This macro will convert the selected box to upper case.
Sub Upper()
Dim Cell As Range
For Each Cell In Selection.Cells
If Cell.HasFormula = False Then
Cell = UCase(Cell)
End If
End Sub

This entry was posted in Office and tagged , . Bookmark the permalink.