Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default 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...


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default 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


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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.


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to refine this Macro [email protected] Excel Discussion (Misc queries) 3 June 6th 09 11:33 PM
Search & Refine Raw Data bbibib Excel Discussion (Misc queries) 8 January 6th 07 06:12 PM
Change Lowercase or Proper to ALL CAPS Don Excel Programming 3 November 6th 06 08:13 AM
Is there a way to change Lowercase or Proper to ALL CAPS? Don Excel Worksheet Functions 2 November 5th 06 08:57 PM
Refine search criteria for Find Method ExcelMonkey Excel Programming 2 July 20th 05 03:03 PM


All times are GMT +1. The time now is 05:01 AM.

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"