Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Changing Case

Is there a way to change the casing a text in Excel? Not necessarily all to
upper case, but maybe to where the first letter of a word is upper case? If
not a way, does anyone have a routine or macro that will do this please?
Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Changing Case

See UPPER, LOWER, and PROPER worksheet functions in Excel help.

See UCase and LCase functions in VBE help.

PROPER will capitalize the first letter of each word.

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------
On Tue, 23 Sep 2003 21:06:13 -0700, "Mark G."
wrote:

Is there a way to change the casing a text in Excel? Not necessarily all to
upper case, but maybe to where the first letter of a word is upper case? If
not a way, does anyone have a routine or macro that will do this please?
Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Changing Case

Found that, but how do I use or integrate this? Thanks.
wrote in message
...
See UPPER, LOWER, and PROPER worksheet functions in Excel help.

See UCase and LCase functions in VBE help.

PROPER will capitalize the first letter of each word.

HTH
Paul
--------------------------------------------------------------------------

------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------

------------------------------------
On Tue, 23 Sep 2003 21:06:13 -0700, "Mark G."
wrote:

Is there a way to change the casing a text in Excel? Not necessarily all

to
upper case, but maybe to where the first letter of a word is upper case?

If
not a way, does anyone have a routine or macro that will do this please?
Thanks.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Changing Case

This routine may get you started:

Sub LetterCase()
'Leo Heuseer, 24 Sept. 2003
Dim Cell As Range

For Each Cell In ActiveSheet.UsedRange
Cell.Value = _
Application.WorksheetFunction.Proper(Cell.Value)
Next Cell
End Sub


--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only please.

"Mark G." skrev i en meddelelse
...
Found that, but how do I use or integrate this? Thanks.
wrote in message
...
See UPPER, LOWER, and PROPER worksheet functions in Excel help.

See UCase and LCase functions in VBE help.

PROPER will capitalize the first letter of each word.

HTH
Paul


--------------------------------------------------------------------------
------------------------------------
Be advised to back up your WorkBook before attempting to make changes.


--------------------------------------------------------------------------
------------------------------------
On Tue, 23 Sep 2003 21:06:13 -0700, "Mark G."
wrote:

Is there a way to change the casing a text in Excel? Not necessarily

all
to
upper case, but maybe to where the first letter of a word is upper

case?
If
not a way, does anyone have a routine or macro that will do this

please?
Thanks.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default Changing Case

Mark, you might also want to give this a try, you can put it in your
personal worksheet and then you can use it in all your workbooks, will bring
up an input box to let you select what to change to

Sub TextConvert()
'By Ivan F Moala
'will change the text that you have selected,
'if no text is selected it will change the whole sheet
Dim ocell As Range
Dim Ans As String

Ans = Application.InputBox("Type in Letter" & vbCr & _
"(L)owercase, (U)ppercase, (S)entence, (T)itles ")

If Ans = "" Then Exit Sub

For Each ocell In Selection.SpecialCells(xlCellTypeConstants, 2)
Select Case UCase(Ans)
Case "L": ocell = LCase(ocell.Text)
Case "U": ocell = UCase(ocell.Text)
Case "S": ocell = UCase(Left(ocell.Text, 1)) & _
LCase(Right(ocell.Text, Len(ocell.Text) - 1))
Case "T": ocell = Application.WorksheetFunction.Proper(ocell.Text)
End Select
Next

End Sub


--
Paul B
Always backup your data before trying something new
Using Excel 2000 & 97
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
"Mark G." wrote in message
...
Is there a way to change the casing a text in Excel? Not necessarily all

to
upper case, but maybe to where the first letter of a word is upper case?

If
not a way, does anyone have a routine or macro that will do this please?
Thanks.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing from lower case to upper case Hok Wong[_2_] Excel Discussion (Misc queries) 11 December 8th 09 02:30 AM
Changing from upper case to lower case Louise Excel Discussion (Misc queries) 13 May 27th 08 05:30 PM
Changing multiple cell text from lower case to upper case Patti Excel Discussion (Misc queries) 2 January 4th 08 08:35 PM
Changing Upper case to Proper Case Mountain Excel Worksheet Functions 1 January 13th 05 10:37 PM
changing lower case to upper case T. Campbell Excel Discussion (Misc queries) 1 December 8th 04 05:37 PM


All times are GMT +1. The time now is 03:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"