ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Please refine this to use lowercase instead of Proper (https://www.excelbanter.com/excel-programming/414879-please-refine-use-lowercase-instead-proper.html)

Solutions Manager

Please refine this to use lowercase instead of Proper
 
I have the following bit of code that works great for Proper case, but
doesn't work for Lowercase. I have tried LCase, vbLowerCase, Lower.... and it
doesn't work. Can this be adjusted?

Sub case_TEST()
Application.ScreenUpdating = False
ActiveWorkbook.Sheets("manifest").Select
Range("A2:Y201").Value = Application.proper(Range("A2:Y201").Value)
Application.ScreenUpdating = True
End Sub



Barb Reinhardt

Please refine this to use lowercase instead of Proper
 
Have you tried

Range("A2:Y201").Value = Application.lcase(Range("A2:Y201").Text)

I can't test it now, so let me know.
--
HTH,
Barb Reinhardt



"Solutions Manager" wrote:

I have the following bit of code that works great for Proper case, but
doesn't work for Lowercase. I have tried LCase, vbLowerCase, Lower.... and it
doesn't work. Can this be adjusted?

Sub case_TEST()
Application.ScreenUpdating = False
ActiveWorkbook.Sheets("manifest").Select
Range("A2:Y201").Value = Application.proper(Range("A2:Y201").Value)
Application.ScreenUpdating = True
End Sub



JLGWhiz

Please refine this to use lowercase instead of Proper
 
Change From:
Range("A2:Y201").Value = Application.proper(Range("A2:Y201").Value)

To:
Range("A2:Y201").Value = Lower(Range("A2:Y201").Value)


"Solutions Manager" wrote:

I have the following bit of code that works great for Proper case, but
doesn't work for Lowercase. I have tried LCase, vbLowerCase, Lower.... and it
doesn't work. Can this be adjusted?

Sub case_TEST()
Application.ScreenUpdating = False
ActiveWorkbook.Sheets("manifest").Select
Range("A2:Y201").Value = Application.proper(Range("A2:Y201").Value)
Application.ScreenUpdating = True
End Sub



JLGWhiz

Please refine this to use lowercase instead of Proper
 
Ddisregard the other and Change From:
Range("A2:Y201").Value = Application.proper(Range("A2:Y201").Value)

To:
Range("A2:Y201").Value = LCase(Range("A2:Y201").Value)


"Solutions Manager" wrote:

I have the following bit of code that works great for Proper case, but
doesn't work for Lowercase. I have tried LCase, vbLowerCase, Lower.... and it
doesn't work. Can this be adjusted?

Sub case_TEST()
Application.ScreenUpdating = False
ActiveWorkbook.Sheets("manifest").Select
Range("A2:Y201").Value = Application.proper(Range("A2:Y201").Value)
Application.ScreenUpdating = True
End Sub



Solutions Manager

Please refine this to use lowercase instead of Proper
 
so far the presented solutions from everyone have not worked. I get object
not supported and variable not defined errors. It really seems like this
should work. Thanks for the help though...

JLGWhiz

Please refine this to use lowercase instead of Proper
 
I have days like this. You can't change a range of cells in block. You have
to use a loop to do it. Try this:

Sub chCase()
For Each c In Range("A2:Y201")
c.Value = LCase(c.Value)
Next
End Sub


"Solutions Manager" wrote:

I have the following bit of code that works great for Proper case, but
doesn't work for Lowercase. I have tried LCase, vbLowerCase, Lower.... and it
doesn't work. Can this be adjusted?

Sub case_TEST()
Application.ScreenUpdating = False
ActiveWorkbook.Sheets("manifest").Select
Range("A2:Y201").Value = Application.proper(Range("A2:Y201").Value)
Application.ScreenUpdating = True
End Sub



Solutions Manager

Please refine this to use lowercase instead of Proper
 
Thank you. This will work.

"JLGWhiz" wrote:

I have days like this. You can't change a range of cells in block. You have
to use a loop to do it. Try this:

Sub chCase()
For Each c In Range("A2:Y201")
c.Value = LCase(c.Value)
Next
End Sub


"Solutions Manager" wrote:

I have the following bit of code that works great for Proper case, but
doesn't work for Lowercase. I have tried LCase, vbLowerCase, Lower.... and it
doesn't work. Can this be adjusted?

Sub case_TEST()
Application.ScreenUpdating = False
ActiveWorkbook.Sheets("manifest").Select
Range("A2:Y201").Value = Application.proper(Range("A2:Y201").Value)
Application.ScreenUpdating = True
End Sub



Gord Dibben

Please refine this to use lowercase instead of Proper
 
Just be aware that if you have any formulas in the range, they will be wiped
out.

I would revise to this...........

Sub chCase()
For Each c In Range("A2:Y201")
c.Formula = LCase(c.Formula)
Next
End Sub


Gord Dibben MS Excel MVP


On Wed, 30 Jul 2008 13:20:22 -0700, Solutions Manager
wrote:

Thank you. This will work.




All times are GMT +1. The time now is 12:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com