UPPER function

Y

yogart

I have a spreadsheet with cell filled with characters of both upper and lower
case, and I need to change them all to upper case. I have played around
using the UPPER function on another sheet and then copying the subject cell
nmuber on it, and then doing massive copying on the paste sheet. Is there a
simpler way to convert sheet to all upper case? It would be great if I could
highlight the whole page. push a button and it then all upper case. Any
suggestions?
 
M

Mike H

Hi,

You could use this macro. Alt+F11 to open VB editor. Right click
'ThisWorkbook' and insert module and paste the code in and run it

Sub change_to_upper()
For Each c In ActiveSheet.UsedRange
If Not c.HasFormula Then
c.Value = UCase(c.Value)
End If
Next

End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
G

Gord Dibben

Mike

Why would you recommend Thisworkbook module and not a regular module?


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top