What is a macro?
A macro is a sequence of instructions. Excel execute it when you command it.
If you want to clean your text, excel macros will help you to complete your work in a short period of time. If you want to convert selection to lower case with one click, then you can create a macro for same.
Before starting to make sure the developer tab of your excel has been enabled.
How to switch on the developer tab?
Here I am going to mention step by step the procedure for converting selected text to lower case.
Learn More about Excel Macros Here.
Copy The following Source Code;
‘IMPORTANT – Select the Range First
Dim range As Range
For Each range In Selection
‘Check if this is text first, then convert into lower case
If Application.WorksheetFunction.IsText(range) Then
range.Value = LCase(range)
You can see this is our text now let us do some clean up with our macros.
STEP 1: GO TO DEVELOPER>CODE>VISUAL BASIC
STEP 2: Now you must paste in your code and SELECT SAVE. After this close the window.
STEP3. Now let’s test the code we have created. First open the sheet containing data.
GO TO DEVELOPER>CODE>MACROS.
STEP 4. Check that your text and macro both are selected before clicking run. CLICK RUN.
Here is your RESULT. With only one click you get your result. You can see how all the cells are converted into lower case.