ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   is it possible to change upper to lower case in excel (https://www.excelbanter.com/excel-discussion-misc-queries/66654-possible-change-upper-lower-case-excel.html)

Tania

is it possible to change upper to lower case in excel
 


Ron de Bruin

is it possible to change upper to lower case in excel
 
Hi Tania

See this two webpages

http://www.mvps.org/dmcritchie/excel/proper.htm
Or
http://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 & "," & 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 Sub


Sub Lowercase_macro()
Dim selectie As Range
Dim cel As Range
On Error Resume Next
Set selectie = Range(ActiveCell.Address & "," & 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 Sub


Sub Propercase_macro()
Dim selectie As Range
Dim cel As Range
On Error Resume Next
Set selectie = Range(ActiveCell.Address & "," & 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
http://www.rondebruin.nl


"Tania" wrote in message ...




FvH

is it possible to change upper to lower case in excel
 

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 "AbOut" 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 "about". If, instead you had used the
UPPER function would display "ABOUT", and using the PROPER function
would display "About". You could then use the "Paste Special" command
to replace the contents of A1.


--
FvH
------------------------------------------------------------------------
FvH's Profile: http://www.excelforum.com/member.php...o&userid=30709
View this thread: http://www.excelforum.com/showthread...hreadid=503768



All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com