Need an UPPERCASE format ability in Excel just like Word
Add
Dim C as Range
to the top of each procedure, like:
Sub UpCase( )
Dim C as Range
For Each c In Selection.Cells
c.Value = UCase$(c.Value)
Next c
End Sub
Samad wrote:
Hi Paul
I'm receiving complie error "Variable (c) is not define" , please correct
this problem & repost the codes of upcase,lowcase & propercase.
Thanks for a handy tool
"Paul D. Simon" wrote:
Ron,
Here's a simple macro. To make it available all the time, put it in a
Module in the VBE of your Personal.xls. (I gave it the name UpCase -
you can name it anything you want.)
You can then assign it to a toolbar button, and/or a shortcut key
and/or add it to your menu. For example, if you assign it to a toolbar
button, highlight the cells you want changed to upper case and just
click the button.
I've also included a Lower Case version for you.
Sub UpCase( )
For Each c In Selection.Cells
c.Value = UCase$(c.Value)
Next c
End Sub
Sub LowCase( )
For Each c In Selection.Cells
c.Value = LCase$(c.Value)
Next c
End Sub
This should give you what you're looking for.
Paul
--
Dave Peterson
|