5 USEFUL MACROS EVERY EXCEL USER SHOULD KNOW HOW TO RECORD
- GetSpreadsheet Expert
- 19 hours ago
- 3 min read
Macros are a simple yet powerful way to automate repetitive tasks in Excel. A macro is essentially a recording of your actions in a spreadsheet, which you can then play back with a single click or a keyboard shortcut. You don't need to be a programmer to use them—Excel's Macro Recorder feature makes it incredibly easy to create a macro that can save you countless hours of manual work.

Here are five simple but highly useful macros that every Excel user should know how to record.
FORMATTING A DATA TABLE
Many users spend a lot of time manually formatting their data tables. Using a macro, you can automatically format a table with consistent fonts, colors, and borders. To record it, simply click 'Record Macro' on the 'View' tab, perform all your formatting steps (bolding headers, adding a border, etc.), and then click 'Stop Recording.' Now, by click a button, you can apply this consistent formatting to any new data table.
AUTOFITTING COLUMNS AND ROWS
Manually adjusting column widths and row heights can be a tedious and repetitive task. You can record a macro that autofits all columns and rows in your active worksheet. The steps are simple: record the macro, select all cells (Ctrl+A), then use the keyboard shortcut Alt+H+O+I for column width and Alt+H+O+A for row height. You can then assign a quick shortcut like Ctrl+Shift+F to this macro, allowing you to automatically adjust all columns and rows with a single keypress.
HIDING AND SHOWING SHEETS
If you have a workbook with many sheets, some of which contain raw data or calculations that you don't want to show, you can record a macro to hide and unhide them. Simply record the macro, right-click on the sheet tabs you want to hide, select 'Hide,' then stop the recording. You can record a second macro to unhide the sheets. This is useful for creating a clean, professional-looking dashboard where the underlying data is hidden from view.
INSERTING A HEADER AND FOOTER
If you frequently need to print out reports with a consistent header and footer (e.g., with your company name and the current date), you can record a macro to do this. Simply start the recorder, go to the 'Page Layout' tab, open the 'Page Setup' dialog, and add your desired text to the header and footer sections. This macro will then apply the same header and footer to any sheet you are working on, ensuring consistency across all your printed documents.
REFRESHING ALL PIVOTTABLES
For workbooks that contain many PivotTables linked to external data sources, manually refreshing each one can be a pain. You can record a macro to refresh all PivotTables in your workbook. The steps are simple: record the macro, go to the 'Data' tab, click the 'Refresh All' button, and then stop the recording. You can then assign a shortcut to this macro, allowing you to update all your PivotTables with a single keypress.
Macros are a great way to introduce automation into your daily Excel tasks. By recording these five simple macros, you can eliminate a lot of the manual, repetitive work that often slows you down. With the Macro Recorder, you can easily turn a sequence of actions into a reusable tool, making your workflow faster, more efficient, and far less tedious.