As you often know with friends in Word, you can easily change English characters ' uppercase ', ' lowercase ', ' first-letter ' and ' first-letter capitals ' in Word.
However, these features Excel do not have, if you want to use these features in Excel, you must manually modify or use complex formulas for conversion. In fact, we can write related macros to solve this problem once and for all.
First draw four command buttons to change the text on the button to "all caps", "all lowercase", "uppercase" and "uppercase". Then write the corresponding macro code for each button individually.
For example, "All Caps" button, enter the code:
Code fragment:
Sub All caps ()
Dim itarget as Range
Set itarget = Selection
for every ran in ITarget
converts cell contents to uppercase
Ran.value = UCase (RAN)
Next end
Sub
Right-click the All Lowercase button and enter the code:
Sub all lowercase ()
Dim itarget as Range
Set itarget = Selection
for every ran in ITarget
converts cell contents to lowercase
Ran.value = LCase (RAN)
Next end
Sub
The button is ready to use when you have completed the above operation. Select the target cell range and click the corresponding conversion button, and the selected English character is converted to the size we want.