As I have written a few articles on VBA, I have mentioned that VBA for Excel or Office Suite is the new blooming coding language that all professional Office users will require. If you are using Excel, you might often need to do a specific formatting, like bold, underline, italics, border, shadow, etc. repeatedly in every row for a definite column. So, you can skip the 6-7 steps of formatting every time by creating a macro code for yourself and call it everytime you need to use it.

Steps To Use The Macro Recorder To Create Macro Of Text Formatting In MS Excel For VBA

First, you have to turn on the Developer Tab in MS Excel.

Next, tap on the Developer tab in the Ribbon. There are two types of references, one is the absolute reference and the other one is the relative reference. I have already written an article on the same topic using relative reference. But here, I shall show you without using relative reference. Now, click on Record Macro .

Relative reference macro recorder VBA

Now, the Record Macro window opens. Select a shortcut key for you. For example, I have selected Ctrl+q, you can select Ctrl+Shift+q or anything you want.

macro recorder VBA

Now, the Macro has started recording. Whatever, it will do, will be recorded step by step. So, first select the cell where you are going to work. Remember, this cell will also be recorded. Later on, whenever you call this macro, the macro will run and execute in that cell only. If you use relative reference, the text will execute in any cell you want.

Next, type the text and hit Ctrl+Enter. Remember to do this step before doing any formatting on the text. If you do the formatting before hitting the enter button, the formatting will not be applied in the subsequent macro calls.

When the formatting is done, go to the Developer tab and click on Stop Recording. Do not skip this step! If you do so, your macro will keep on recording and you won’t get the desired result.

So, it’s done. Now, whenever you need to do the same formatting, just run the macro and edit the text if you need to make any change to the text.

VBA formatting Excel

That’s all!

Read More: List Of All Excel VBA Tutorials

About 

Happiness is that best therapy. Use it to heal yourself and then others!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.