Friends who often use word know that they can easily change the "uppercase", "lowercase", and "uppercase" letters of the sentence in Word. However, these functions are not available in Excel, to use these functions in Excel, you must manually modify them or use complex formulas for conversion. In fact, you can write related macros to solve this problem once and for all.
First, draw the command button and change the text of the button to "all uppercase" and "all lowercase ". Right-click the button and write corresponding macros for each button.Code.
Sub all uppercase () dim itarget as rangeset itarger = selectionfor each ran in itargetran. value = ucase (RAN) nextend sub
--------------
Sub all lower case () dim itarget as rangeset itarget = selectionfor each ran in itargetran. value = lcase (RAN) nextend sub
The code for uppercase letters is too long. You can download the code at http://www.icpc#com/bzsoft. Select the target cell area and click the convert button.