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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
a macro to PROPER text
I would like a macro that would set the "proper" format for the cell selected.
Thanks |
#2
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|