![]() |
How can I use one formula to change case on an entire worksheet?
I inherited a worksheet where some of the names are typed on all caps. Is
there an easy way to change the case on those cells without selecting each cell individually and using the PROPER function? |
How can I use one formula to change case on an entire worksheet?
If the names are in a column, create a Proper function in a new column beside
it and copy it down. The copy the new column and paste values back over the original. "pow835" wrote: I inherited a worksheet where some of the names are typed on all caps. Is there an easy way to change the case on those cells without selecting each cell individually and using the PROPER function? |
How can I use one formula to change case on an entire worksheet?
Easiest method is to use a macro.
Select all cells then run the 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 MS Excel MVP On Tue, 4 Apr 2006 08:05:02 -0700, pow835 wrote: I inherited a worksheet where some of the names are typed on all caps. Is there an easy way to change the case on those cells without selecting each cell individually and using the PROPER function? |
All times are GMT +1. The time now is 07:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com