+ Reply to Thread
Results 1 to 5 of 5

Alter propecase macro to run if cell content is all caps

  1. #1
    Forum Contributor
    Join Date
    07-11-2010
    Location
    Minneapolis, USA
    MS-Off Ver
    Excel 2016
    Posts
    308

    Alter propecase macro to run if cell content is all caps

    I want to run the macro only if the cell has ALL Caps or only on the Part to the right of the "," is ALL caps but I can not figure out how to test for this last part

    BOB BOBERSON, Ph.D. this is not all caps and I want Bob Boberson, Ph.D which the macro will give me but I do NOT want to run the macro on any other cells since it seem impossible to figure out all the combinations of name and there proper case, If some one wrote there name such that it is NOT all caps I just want to leave it alone.

    Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Alter propecase macro to run if cell content is all caps

    Use Ubound() to get the last element of an array that was Split(). Compare that in an If() where you use UCase() of that element compared to the element. You are part way there already. Just add these concepts.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,628

    Re: Alter propecase macro to run if cell content is all caps

    Maybe:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Contributor
    Join Date
    07-11-2010
    Location
    Minneapolis, USA
    MS-Off Ver
    Excel 2016
    Posts
    308

    Re: Alter propecase macro to run if cell content is all caps

    Kenneth Hobson, this works, is this what you were thinking from your comments?

    TMShucks, thanks for the code you answered my question alas my question was poorly written and did fully reflect what I needed.

    Thank you both

    Please Login or Register  to view this content.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,628

    Re: Alter propecase macro to run if cell content is all caps

    Glad you have a solution that works for you


    Regards, TMS




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Dynamically Alter Macro Based on Tab Name or Cell Value
    By mandora in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-09-2014, 07:50 PM
  2. [SOLVED] Macro stops working after I alter a cell
    By madhatter40 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2013, 04:09 PM
  3. Alter value in one cell alter value in multiple cells
    By Bryan Noqw in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-11-2008, 05:31 AM
  4. arrow keys alter content when exiting cell
    By vdb123 in forum Excel General
    Replies: 1
    Last Post: 01-11-2008, 10:52 PM
  5. Replies: 0
    Last Post: 08-16-2006, 09:18 PM

Tags for this Thread

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