Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how can i capitalise text in an existing workbook
can someone pls explain how to change text in an existing excel workbook to
capitalsas in upper case text thank you |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how can i capitalise text in an existing workbook
Hi craigs rus
The best thing you can do is use a macro. There is also a worksheet function if you want =UPPER(D7) See this 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 "craigs rus" <craigs wrote in message ... can someone pls explain how to change text in an existing excel workbook to capitalsas in upper case text thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Tempate Issue When Opening Existing Excel Workbook | Setting up and Configuration of Excel | |||
Link Protected WorkBook ... and Get #N/A for Text Values! | Excel Discussion (Misc queries) | |||
Column retrieval as an input to an existing workbook | Excel Discussion (Misc queries) | |||
Appending external worksheets into existing workbook? | Links and Linking in Excel | |||
How to add another line in cells with existing text? | New Users to Excel |