Results 1 to 3 of 3

Thread: Change case of text to proper except after a number

  1. #1

    Change case of text to proper except after a number

    Register for a FREE account, and/
    or Log in to avoid these ads!

    I would like to take information about medication from one sheet that is in all caps and automatically copy that information to another sheet where only the first letter of the words are capitalized. However, I do not want text that is directly next to numbers capitalized. So, in my first sheet, I have PROZAC 20MG, and I would like the other sheet to display Prozac 20mg. If I use the proper function, it displays Prozac 20Mg. I want the m in mg to be lowercase. How can I do this?

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Nanaimo, BC, Canada
    Blog Entries
    Excel Version
    Excel Office 365 Insider
    Is there always a space between the drug name and the quantity? And is there ever a drug name that has a space within itself?
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: -||- Blog: -||- Forums:
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  3. #3
    Acolyte Kevin@Radstock's Avatar
    Join Date
    Oct 2012
    Excel Version
    Hi notatech

    One way would be with the following: =PROPER(LEFT(A1,FIND(" ",A1)-1))&" "&LOWER(RIGHT(A1,LEN(A1)-FIND(" ",A1)))


Posting Permissions

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