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?
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?
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: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/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.
Hi notatech
One way would be with the following: =PROPER(LEFT(A1,FIND(" ",A1)-1))&" "&LOWER(RIGHT(A1,LEN(A1)-FIND(" ",A1)))
Kevin
Bookmarks