ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to change cell data from all upper to title case (https://www.excelbanter.com/excel-discussion-misc-queries/3175-how-change-cell-data-all-upper-title-case.html)

LM

How to change cell data from all upper to title case
 
I need to change several columns of data from all upper case to Title Case.
What formula should I use & How can I apply the formula to the data in each
cell?

Dave O

Check out the Proper() function. It changes any case to title case,
and can be copied from cell to cell to apply the formula to your data.


Dave O

Check out the Proper() function. It changes any case to title case and
you can copy it to a range of cells to apply it to your data.


Gord Dibben

You have other answers showing the use of the PROPER Function to act upon one
cell at a time.

If you want to change many cells at once you will need a macro.

Sub Proper_Case()
'David McRitchie, programming, 2003-03-07
Dim rng1 As Range, rng2 As Range, bigrange As Range
Dim Cell As Range
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
On Error Resume Next
Set rng1 = Intersect(Selection, _
Selection.SpecialCells(xlCellTypeConstants))
Set rng2 = Intersect(Selection, _
Selection.SpecialCells(xlCellTypeFormulas))
On Error GoTo 0
If rng1 Is Nothing Then
Set bigrange = rng2
ElseIf rng2 Is Nothing Then
Set bigrange = rng1
Else
Set bigrange = Union(rng1, rng2)
End If
If bigrange Is Nothing Then
MsgBox "All cells in range are EMPTY"
GoTo done
End If
For Each Cell In bigrange
Cell.Formula = Application.Proper(Cell.Formula)
Next Cell
done:
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub


Gord Dibben Excel MVP

On Thu, 6 Jan 2005 07:09:04 -0800, "LM" wrote:

I need to change several columns of data from all upper case to Title Case.
What formula should I use & How can I apply the formula to the data in each
cell?




All times are GMT +1. The time now is 02:34 PM.

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