Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mammoth
 
Posts: n/a
Default uppercase to lowercase

How do you convert uppercase copy to lowercase copy in an entire excel
spreadsheet?
  #2   Report Post  
Norman Jones
 
Posts: n/a
Default

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


---
Regards,
Norman



"Mammoth" wrote in message
...
How do you convert uppercase copy to lowercase copy in an entire excel
spreadsheet?



  #3   Report Post  
David McRitchie
 
Posts: n/a
Default

Hi Norman,
Not sure why you modified a macro to do an entire workbook
to do a single specified worksheet. You could use activesheet
instead of sht, and then the macro would be generic (use on any
sheet without modifying the macro).
http://www.mvps.org/dmcritchie/excel/proper.htm#lower
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Norman Jones" wrote in message ...
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


---
Regards,
Norman



"Mammoth" wrote in message
...
How do you convert uppercase copy to lowercase copy in an entire excel
spreadsheet?





  #4   Report Post  
Norman Jones
 
Posts: n/a
Default

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



"David McRitchie" wrote in message
...
Hi Norman,
Not sure why you modified a macro to do an entire workbook
to do a single specified worksheet. You could use activesheet
instead of sht, and then the macro would be generic (use on any
sheet without modifying the macro).
http://www.mvps.org/dmcritchie/excel/proper.htm#lower
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"