View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Need an UPPERCASE format ability in Excel just like Word

Samad

Would like to point out that these macros will also convert any formulas in the
range to values only.

Might not be what you want.

I prefer C.Value = UCase$(C.Formula)


Gord Dibben MS Excel MVP

On Tue, 23 Jan 2007 22:51:01 -0800, 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