P
Phil H
I need a macro, which will be attached to a button, to change text to upper
case for any range of selected cells. Can someone help?
case for any range of selected cells. Can someone help?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Rick Rothstein said:Well I guess this macro would handle all of the concerns raised in this
thread...
Sub UpperCaseRange()
Dim C As Range
For Each C In Selection
If Not C.HasFormula Then
C.Value = UCase(C.Value)
ElseIf IsNumeric(C.Text) Then
C.Value = UCase(C.Value)
Else
C.Formula = "=UPPER(" & Mid(C.Formula, 2) & ")"
End If
Next
End Sub
Your macro changes all
cells in the worksheet to UC.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.