Saturday, April 17, 2010

change all text in a column to caps

copy this
code...then go to your workbook...insert module...and paste the code there....Then come back to your workbook...and run the macro name will change all the values in A Column starting from row-1 till last row in upper case...

Sub change()
Dim rng As Range, cell As Range
Set rng = Range("A1:A" & Cells(65536, "A").End(xlUp).Row)
For Each cell In rng
If (cell.Value <> "") Then
cell.Value = UCase(cell.Value)
End If
Next cell

End Sub

No comments: