A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

a macro to PROPER text



 
 
Thread Tools Display Modes
  #1  
Old March 9th, 2009, 11:56 PM posted to microsoft.public.excel.newusers
pcor
external usenet poster
 
Posts: 171
Default a macro to PROPER text

I would like a macro that would set the "proper" format for the cell selected.
Thanks
  #2  
Old March 10th, 2009, 08:32 AM posted to microsoft.public.excel.newusers
Roger Govier[_3_]
external usenet poster
 
Posts: 2,297
Default a macro to PROPER text

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
news
I would like a macro that would set the "proper" format for the cell
selected.
Thanks


  #3  
Old March 10th, 2009, 01:35 PM posted to microsoft.public.excel.newusers
pcor
external usenet poster
 
Posts: 171
Default a macro to PROPER text

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
news
I would like a macro that would set the "proper" format for the cell
selected.
Thanks


  #4  
Old March 10th, 2009, 02:49 PM posted to microsoft.public.excel.newusers
Shane Devenshire
external usenet poster
 
Posts: 845
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
news
I would like a macro that would set the "proper" format for the cell
selected.
Thanks


  #5  
Old March 11th, 2009, 12:12 PM posted to microsoft.public.excel.newusers
pcor
external usenet poster
 
Posts: 171
Default a macro to PROPER text

Many thanks.Worked very well


"Shane Devenshire" wrote:

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
news I would like a macro that would set the "proper" format for the cell
selected.
Thanks

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.