convert to capital letters

  • Thread starter Thread starter Shawn
  • Start date Start date
S

Shawn

I need a code that will search a range (say, A1:A10) and convert everything
in that range to all caps?
 
Try

Sub Macro()
Dim cell As Range
For Each cell In Range("A1:A10")
If Not cell.HasFormula Then cell.Value = UCase(cell.Value)
Next
End Sub
 
Jacob
Many thanks
Your code works great
Jacob Skaria said:
Try

Sub Macro()
Dim cell As Range
For Each cell In Range("A1:A10")
If Not cell.HasFormula Then cell.Value = UCase(cell.Value)
Next
End Sub
 

Ask a Question

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.

Ask a Question

Back
Top