Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lower case VBA
How can can I adjust the program below to:
Sheets("Sheet1").Select cell = Columns("A:A").Select '***PROGRAM START******* Sub ChangeFromUpperToLowerCase() Dim cell As Range For Each cell In ActiveSheet.UsedRange If Not cell.HasFormula Then cell.Value = LCase(cell.Value) End If Next cell End Sub '***PROGRAM END******* Thanks in advance. Maperalia |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lower case VBA
this should work from anywhere in the workbook. Best NOT to use a whole column. Sub lowerit() For Each c In Sheets("sheet1") _ ..Range("a1:a" & Cells(Rows.Count, "a").End(xlUp).Row) c.Value = LCase(c) Next c End Sub -- Don Guillett SalesAid Software "maperalia" wrote in message ... How can can I adjust the program below to: Sheets("Sheet1").Select cell = Columns("A:A").Select '***PROGRAM START******* Sub ChangeFromUpperToLowerCase() Dim cell As Range For Each cell In ActiveSheet.UsedRange If Not cell.HasFormula Then cell.Value = LCase(cell.Value) End If Next cell End Sub '***PROGRAM END******* Thanks in advance. Maperalia |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lower case VBA
I would recommend agains the select myself you can do something like this...
Sub ChangeFromUpperToLowerCase() Dim rngToChange as Range Dim cell As Range with sheets("Sheet1") set rngToChange = .range(.Range("A1"), .cells(rows.count, "A").end(xlUp)) end with For Each cell In rngToChange If Not cell.HasFormula Then cell.Value = LCase(cell.Value) End If Next cell End Sub -- HTH... Jim Thomlinson "maperalia" wrote: How can can I adjust the program below to: Sheets("Sheet1").Select cell = Columns("A:A").Select '***PROGRAM START******* Sub ChangeFromUpperToLowerCase() Dim cell As Range For Each cell In ActiveSheet.UsedRange If Not cell.HasFormula Then cell.Value = LCase(cell.Value) End If Next cell End Sub '***PROGRAM END******* Thanks in advance. Maperalia |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lower case VBA
Jim;
Thanks very much it is working wonderfully!!!! Maperalia "Jim Thomlinson" wrote: I would recommend agains the select myself you can do something like this... Sub ChangeFromUpperToLowerCase() Dim rngToChange as Range Dim cell As Range with sheets("Sheet1") set rngToChange = .range(.Range("A1"), .cells(rows.count, "A").end(xlUp)) end with For Each cell In rngToChange If Not cell.HasFormula Then cell.Value = LCase(cell.Value) End If Next cell End Sub -- HTH... Jim Thomlinson "maperalia" wrote: How can can I adjust the program below to: Sheets("Sheet1").Select cell = Columns("A:A").Select '***PROGRAM START******* Sub ChangeFromUpperToLowerCase() Dim cell As Range For Each cell In ActiveSheet.UsedRange If Not cell.HasFormula Then cell.Value = LCase(cell.Value) End If Next cell End Sub '***PROGRAM END******* Thanks in advance. Maperalia |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Lower case VBA
Don Guillett;
Thanks very much it is working wonderfully!!!! Maperalia "Don Guillett" wrote: this should work from anywhere in the workbook. Best NOT to use a whole column. Sub lowerit() For Each c In Sheets("sheet1") _ ..Range("a1:a" & Cells(Rows.Count, "a").End(xlUp).Row) c.Value = LCase(c) Next c End Sub -- Don Guillett SalesAid Software "maperalia" wrote in message ... How can can I adjust the program below to: Sheets("Sheet1").Select cell = Columns("A:A").Select '***PROGRAM START******* Sub ChangeFromUpperToLowerCase() Dim cell As Range For Each cell In ActiveSheet.UsedRange If Not cell.HasFormula Then cell.Value = LCase(cell.Value) End If Next cell End Sub '***PROGRAM END******* Thanks in advance. Maperalia |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing multiple cell text from lower case to upper case | Excel Discussion (Misc queries) | |||
Change the text from lower case to upper case in an Excel work boo | Excel Discussion (Misc queries) | |||
How do I change a column in Excel from upper case to lower case? | Excel Worksheet Functions | |||
TURN LOWER CASE TO UPPER CASE IN EXCEL? | Excel Worksheet Functions | |||
How do I change existing text from lower case to upper case | Excel Discussion (Misc queries) |