uppercase to lowercase

N

Norman Jones

Hi Mammoth,

Try the following macro:

Sub ConvertToLowerCase()
Dim rCell As Range
Dim sh As Worksheet

Set sh = Sheets("Sheet1") '<<==== CHANGE
On Error Resume Next
For Each rCell In sh.Cells.SpecialCells(xlCellTypeConstants, 2)
rCell.Value = LCase(rCell.Value)
Next rCell
On Error GoTo 0

End Sub

Change Sheet1 to the required sheet name.

If you are new to macros, see David McRitchies notes at:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
N

Norman Jones

Hi David,
You could use activesheet
instead of sht, and then the macro would be generic (use on any
sheet without modifying the macro).

Agreed - where the sheet is the active sheet or where it is convenient to
activate the requisite sheet. However, If I had used ActiveSheet (as I
freqently do), I might still have appended the <<=== CHANGE comment, to
allow for use on a non-active sheet.

As for the link to your case procedures page, it is a good one and my posts
frequently make reference to your site.


---
Regards,
Norman
 

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

Top