• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Apply PROPER Function to entire Worksheet?

katarinah

New Member
Is there a way to apply the PROPER Function (or any other Function) to the entire worksheet without having to copy and paste?


Thanks,

Katarina
 
Katarina

Make sure the sheet you want to convert is the acrtive sheet before you go into VBA

Then copy the following code into a code module and execute it

[pre]
Code:
Sub Macro1()
Dim c As Range
Range("A1").Select
For Each c In Range(Selection, ActiveCell.SpecialCells(xlLastCell))
c.Value = StrConv(c.Text, vbProperCase)
Next
End Sub
[/pre]
 
Back
Top