Record Macro option in Excel helps you to record all the operations that you are performing in the excel sheet when the record macro is enabled. This option facilitates users who do not know Visual Basic to write a macro.
Lets have a scenario for formatting a table using Record Macro option.
1. Create a sample data in a worksheet
2. Select entire sample data using Ctrl+End + Right Arrow Key and Ctrl + End + Down Arrow Key to select entire table. This helps to format entire table, if your table contains n number of rows and n number of columns. Click Record Macro in Developer’s Tab. Enter macro name, shortcut key and description if required.
3. Format the table as you wish.
4. After completing the table format, stop macro recording. Click Stop Recording in Developer’s tab
5. Now, try to load with some sample data (for example, have data with n number of rows and n number of columns) in the same sheet or separate sheet but in the same workbook.
6. Select entire data in the sheet and run the macro. To run the macro, press Alt + F8 shortcut key to get macro dialog box
7. Find that entire table have formatted as we have formatted the sample data.