Hi Tania
See this two webpages
www.mvps.org/dmcritchie/excel/proper.htm
Or
www.cpearson.com/excel/case.htm
Here are some Macro's for changing text cells in the selection
Sub Uppercase_macro()
Dim selectie As Range
Dim cel As Range
On Error Resume Next
Set selectie = Range(ActiveCell.Address amp; quot;,quot; amp; Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
If selectie Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each cel In selectie
cel.Value = UCase(cel.Value)
Next cel
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End SubSub Lowercase_macro()
Dim selectie As Range
Dim cel As Range
On Error Resume Next
Set selectie = Range(ActiveCell.Address amp; quot;,quot; amp; Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
If selectie Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each cel In selectie
cel.Value = LCase(cel.Value)
Next cel
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End SubSub Propercase_macro()
Dim selectie As Range
Dim cel As Range
On Error Resume Next
Set selectie = Range(ActiveCell.Address amp; quot;,quot; amp; Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
If selectie Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each cel In selectie
cel.Value = StrConv(cel.Value, vbProperCase)
Next cel
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub--
Regards Ron de Bruin
www.rondebruin.nlquot;Taniaquot; gt; wrote in message ...
gt;
To change case in Excel you need to use an Excel function. The functions
are listed below.
=UPPER()
This function will change the case of a specified cell to upper case.
=LOWER()
This function will change the case of a specified cell to lower case.
=PROPER()
This function will change the case of a specified cell to title case
(ie The first letter of each word in the cell will be capitalised).
How To Use These Functions
Its easiest to illustrate the use of these functions through an
example. If, for example, you had the word quot;AbOutquot; in cell A1 and
wanted to change the case to lower case you would use the LOWER
function in a blank cell:
=LOWER(A1)
That cell would then display quot;aboutquot;. If, instead you had used the
UPPER function would display quot;ABOUTquot;, and using the PROPER function
would display quot;Aboutquot;. You could then use the quot;Paste Specialquot; command
to replace the contents of A1.--
FvH
------------------------------------------------------------------------
FvH's Profile: www.excelforum.com/member.php...oamp;userid=30709
View this thread: www.excelforum.com/showthread...hreadid=503768
- Jun 22 Fri 2007 20:38
is it possible to change upper to lower case in excel
close
全站熱搜
留言列表
發表留言