View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.newusers
Shane Devenshire Shane Devenshire is offline
external usenet poster
 
Posts: 857
Default a macro to PROPER text

Hi,

For Proper you need to call the worksheet function but for upper and lower
you must use UCase and PCase

c.Value = UCase(c.Value)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"pcor" wrote:

Thanks. That worked very well. I had thought that to use this macro I could
replace "Proper" with "Upper" or "Lower" but that did not work. So How do I
change your macro to change the cell to either UPPER or LOWER format.
Thanks
Ian M

"Roger Govier" wrote:

Hi

Sub SetProper()

Dim c As Range
For Each c In Selection
c.Value = WorksheetFunction.Proper(c.Value)
Next

End Sub


--
Regards
Roger Govier

"pcor" wrote in message
...
I would like a macro that would set the "proper" format for the cell
selected.
Thanks