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
Next
End Sub

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s