To change text in a selected range to upper case use this code.
Sub UpperCase() Dim cell As Range For Each cell In Selection.Cells If cell.HasFormula = False Then cell = UCase(cell) End If NextEnd Sub
formula=upper(a1)also=lower(a1)however:Sub ProperCase()Dim cell As RangeFor Each cell In Selection.CellsIf cell.HasFormula = False Thencell = strconv(cell.text,vbProperCase)End IfNextEnd Sub
Subscribe for FREE Excel Items:
E-mail:
formula
ReplyDelete=upper(a1)
also
=lower(a1)
however:
Sub ProperCase()
Dim cell As Range
For Each cell In Selection.Cells
If cell.HasFormula = False Then
cell = strconv(cell.text,vbProperCase)
End If
Next
End Sub