You can also use other shortcuts, but remember that it will override the default Excel shortcut The upper () function allows. Select cells you want to convert to uppercase and press the keyboard shortcut youve just created. This will assign Ctrl + Shift + A button to the macro. Click inside it and press Shift + A. Shortcut capital letter Excel.
![]() Lcase Ucase Not Working In Office 2011 Code That AlmostHere it is if anyone is interested in properly formatting names automatically.Function ProperCase(strOneLine As String, intChangeType As Integer) As String'- This function will convert a string to Proper Case -'- The initial letter of each word is capitalised. It's a function I found in one of the forums. I have found code that almost works as I want it without listing each name. At the moment, all it does is replace all examples of the text within whatever you have selected.Hope this at least points you in the right direction.Thanks for all the suggestions. If you get much above 20 names, I'd suggest storing your data in another location and beginning to separate the functionality. Just keep adding to the string if you need more names.![]() Or when you have a period, semi-colon. For instance- what about trapping for hard spaces (they don't look like " " to code, although they tend to look the same to the Find object). I tried the same code using a text box and it will format the " o' " words ok but not if it is just a line of text that is selected outside of a textbox which is how I have to use it.That's kind of the problem with the whole string manipulation approach- there's always going to be something you didn't think of. Mac emulator systemAnd then add names to individual table cells.Cycle through the table cells, build your array of names. But I think you can get what you want easier by using the built-in AutoCorrect feature, or simply adding names to a list and using find/replace.As an example- in your macro template (where the macros are stored, as long as it isn't just in your Normal template), you could put a table. Much easier (in my mind) than trapping for partial words, and having to worry about whether you've corrected for every situation.This is an excellent thread on the power (and limitations) of string manipulation. There are a lot of ways to have that list be very friendly and easy to add to. ![]() In addition to what the previous one does, mine also allows you to specify whether to retain certain words in lower-case form.Function ProperCase(StrTxt As String, Optional Caps As Long, Optional Excl As Long) As String'Surnames like O', Mc and hyphenated names are converted to proper case also.'If Caps = 0, then upper-case strings like ABC are preserved otherwise they're converted.'If Excl = 0, selected words are retained as lower-case, except when they follow specified punctuation marks. Just the table.Here's a re-write I've done of the function.
0 Comments
Leave a Reply. |
AuthorBeth ArchivesCategories |