ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I Change Case or tOGGLE cASE in Excel? (https://www.excelbanter.com/excel-discussion-misc-queries/234238-how-do-i-change-case-toggle-case-excel.html)

Excel Phobic

How do I Change Case or tOGGLE cASE in Excel?
 
How do we Change Case to UPPER, Titel, Sentence, lower and tOGGLE case for
text within Excel?
Seems a simple one that MS would have taken care of by now.
Do we still have to take the data to MS Word and then change case (Shift+F3)
and then bring it back?



Jacob Skaria

How do I Change Case or tOGGLE cASE in Excel?
 
The formulas are
=UPPER(A1)
=LOWER(A1)
=PROPER(A1)

--
If this post helps click Yes
---------------
Jacob Skaria


"Excel Phobic" wrote:

How do we Change Case to UPPER, Titel, Sentence, lower and tOGGLE case for
text within Excel?
Seems a simple one that MS would have taken care of by now.
Do we still have to take the data to MS Word and then change case (Shift+F3)
and then bring it back?



Gord Dibben

How do I Change Case or tOGGLE cASE in Excel?
 
You can use the functions upper, lower or proper in helper cells.

Or use macros to make the changes in place.

Sub Upper()
Dim Cell As Range
Application.ScreenUpdating = False
For Each Cell In Selection
Cell.Formula = UCase(Cell.Formula)
Next
Application.ScreenUpdating = True
End Sub


Sub Lower()
Dim Cell As Range
Application.ScreenUpdating = False
For Each Cell In Selection
Cell.Formula = LCase(Cell.Formula)
Next
Application.ScreenUpdating = True
End Sub


Sub Proper()
Dim Cell As Range
Application.ScreenUpdating = False
For Each Cell In Selection
Cell.Formula = Application.Proper(Cell.Formula)
Next
Application.ScreenUpdating = True
End Sub

Sub Sentence()
For Each Cell In Selection.Cells
S = Cell.Value
Start = True
For I = 1 To Len(S)
ch = Mid(S, I, 1)
Select Case ch
Case "."
Start = True
Case "?"
Start = True
Case "a" To "z"
If Start Then ch = UCase(ch): Start = False
Case "A" To "Z"
If Start Then Start = False Else ch = LCase(ch)
End Select
Mid(S, I, 1) = ch
Next


Gord Dibben MS Excel MVP
Cell.Value = S
Next
End Sub

On Wed, 17 Jun 2009 23:26:01 -0700, Excel Phobic <Excel
wrote:

How do we Change Case to UPPER, Titel, Sentence, lower and tOGGLE case for
text within Excel?
Seems a simple one that MS would have taken care of by now.
Do we still have to take the data to MS Word and then change case (Shift+F3)
and then bring it back?




All times are GMT +1. The time now is 03:13 PM.

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