+ Reply to Thread
Results 1 to 19 of 19

VBA code for changing capital letters become lower

  1. #1
    Registered User
    Join Date
    03-18-2012
    Location
    ID
    MS-Off Ver
    Excel 2007
    Posts
    14

    Post VBA code for changing capital letters become lower

    Hi, I have some problems here. I have to change
    1. the capital letter of "X" becomes lower letter "x" and
    2. the "x" after first "x" becomes dot "."
    Would you mind to help me?

    For the example:
    4391.4586X5.5.5/57x20/885.85x10/61x12/64.58x8/8328.2883x2x2x5/64.11.47x5/230.30.249.49x30/130.630.30.93.57.230x5

    As you see the red one should be 4391.4586x5.5.5 and 8328.2883x2.2.5

    For another example:
    739.93.12x2/39.99x3/89.98x12/249.49.94.230.30x5/2989.8929X3X3X3/128x2.3/46x2/2165x5.5.5/0131.131.113.031.013x10/3

    As you see the red one should be 2989.8929x3.3.3

    I'm using Windows7 for notebook and XP for PC, Excel 2007
    Any help would be great.





    Regards


    Jasa

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: VBA code for changing capital letters become lower

    see this
    http://www.cpearson.com/Excel/ChangingCase.aspx
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Registered User
    Join Date
    03-18-2012
    Location
    ID
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VBA code for changing capital letters become lower

    Hi, thank you for your reply. If I added the code for function number 2, can I use this vba?

    Please Login or Register  to view this content.
    Thank you for helping me




    Regards,


    Jasa

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: VBA code for changing capital letters become lower

    I am not an expert but I think you can do...
    Please Login or Register  to view this content.

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: VBA code for changing capital letters become lower

    as an option
    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,590

    Re: VBA code for changing capital letters become lower

    Try this
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-18-2012
    Location
    ID
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VBA code for changing capital letters become lower

    Hi all, thank you so much for helping me

    For John55
    Hi, thanks a lot John. But, there's problem in this code, but I don't know what is it. I've tried to use this vba but it doesn't work.

    For nilem
    Hi, thank u so much for your help. It really works, thank u . But, would you mind if this code works for entire column, not just for column A? Thanks a lot nilem.
    Please Login or Register  to view this content.
    For jindon
    Hi, thank u for helping me. It works in my worksheet. But, It seems this code works just for function number 2. The function for changing capital letter of "X" to "x" (lower) doesn't exist. Would you mind to add the first function in to this code? Thanks a lot.
    Please Login or Register  to view this content.

    Thank you for helping me




    Regards,


    Jasa

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,590

    Re: VBA code for changing capital letters become lower

    If you want all "X" to be "x" then change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Last edited by jindon; 04-16-2012 at 03:17 AM.

  9. #9
    Registered User
    Join Date
    03-18-2012
    Location
    ID
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VBA code for changing capital letters become lower

    Quote Originally Posted by jindon View Post
    If you want all "X" to be "x" then change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Hi, thanks a lot Jindon. But, after changed the code, compile error & expected: end statement. So, I deleted one of ")" and it becomes
    Please Login or Register  to view this content.
    But, compile error again because of the sub or function of LCasse$ not defined. Would u mind to solve this problem?
    Thank u for helping me jindon




    Regards


    Jasa

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,590

    Re: VBA code for changing capital letters become lower

    Oops, typo, single "s"
    should read as
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    03-18-2012
    Location
    ID
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VBA code for changing capital letters become lower

    Quote Originally Posted by jindon View Post
    Oops, typo, single "s"
    should read as
    Please Login or Register  to view this content.
    Hi, thanks a lot Jindon. It totally works. But, I'm wondering this VBA can works for entire colums, 'cause sometimes the data is located in other columns beside A column. Would you mind to help me? Thank u so much Jindon.



    Regards,


    Jasa

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,590

    Re: VBA code for changing capital letters become lower

    You mean like this ?
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    03-18-2012
    Location
    ID
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VBA code for changing capital letters become lower

    THANK YOU VERY MUCH FOR JINDON!!

    It's totally great celebration for me.
    Thanks a lot Jindon, you SOLVED my problem.
    I think you're brilliant!
    REALLY2X BRILLIANT!!

    1073124_300.jpg

    I really appreciate the efforts from John55, Nilem, and Jindon to help me.
    It's really great and can't be explained by words.
    I hope you don't mind to help me next time
    Thank you guys for helping me, especially for Jindon!

    Forgive me for all of my mistakes
    and once again, I want to thank for all great efforts from Jindon.
    Thank you so much, Jindon!
    One word for Jindon, BRILLIANT!!


    Regards,


    Jasa

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,590

    Re: VBA code for changing capital letters become lower

    You are welcome.

  15. #15
    Registered User
    Join Date
    03-18-2012
    Location
    ID
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VBA code for changing capital letters become lower

    Quote Originally Posted by jindon View Post
    You are welcome.

  16. #16
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: VBA code for changing capital letters become lower

    Glad you solved it!

  17. #17
    Registered User
    Join Date
    03-18-2012
    Location
    ID
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VBA code for changing capital letters become lower

    Yeah, really a great celebration for this. Thanks a lot for helping me, John!!




    Regards,


    Jasa

  18. #18
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: VBA code for changing capital letters become lower

    Jasa, we are here to help each other, someday you will be able to return the favor!

  19. #19
    Registered User
    Join Date
    03-18-2012
    Location
    ID
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VBA code for changing capital letters become lower

    Quote Originally Posted by john55 View Post
    Jasa, we are here to help each other, someday you will be able to return the favor!
    Of course, John I hope so
    Thank you for helping me!

    Regards, Jasa

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1