Home |
Search |
Today's Posts |
#1
|
|||
|
|||
convert text case in same column or row?
How do I convert text case in the same colum or row. At the moment I use
UPPER, but have to create a new column/row. |
#2
|
|||
|
|||
You may find this to be handy
Sub ChangeCase() 'Don Guillett Application.ScreenUpdating = False Dim r As Range nCase = UCase(InputBox("Enter U for UPPER" & Chr$(13) & " L for lower" & Chr$(13) & " Or " & Chr$(13) & " P for Proper", "Select Case Desired")) Select Case nCase Case "L" For Each r In Selection.Cells If r.HasFormula Then r.Formula = LCase(r.Formula) 'R.Formula = R.Value Else r.Value = LCase(r.Value) End If Next Case "U" For Each r In Selection.Cells If r.HasFormula Then r.Formula = UCase(r.Formula) 'R.Formula = R.Value Else r.Value = UCase(r.Value) End If Next Case "P" For Each r In Selection.Cells If r.HasFormula Then r.Formula = Application.Proper(r.Formula) 'R.Formula = R.Value Else r.Value = StrConv(r.Value, vbProperCase) End If Next End Select Application.ScreenUpdating = True End Sub -- Don Guillett SalesAid Software "siani" wrote in message ... How do I convert text case in the same colum or row. At the moment I use UPPER, but have to create a new column/row. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a formula to spell out a number in excel? | Excel Worksheet Functions | |||
Convert Numeric into Text | Excel Worksheet Functions | |||
Identifying the Active Fill Color | Excel Discussion (Misc queries) | |||
change typed text to upper case | Excel Discussion (Misc queries) | |||
How do I change existing text from lower case to upper case | Excel Discussion (Misc queries) |