Your Microsoft Technology Development and Consulting Experts - Operating since 2000

Location
Australia WideSydney, NSWMelbourne, VicBrisbane, QldPerth, WAAdelaide, SACanberra, ACTNorthern Rivers, NSWWollongong, NSWRichmond, VicDarwin, NT
emailconsult@officeexperts.com.au
Phone1300 102 810
Office experts logo
Contact Us

10 Custom Excel Shortcuts Using Macros (With Practical Use Cases)

Keyboard shortcuts are a game-changer in Excel, but you can build your own too. Record or paste a macro, assign a key combination, and a task that took five or six clicks becomes a single keystroke.

By Daniel ThomasUpdated · 13 min read
One keystroke runs a macroA spreadsheet with one row highlighted, the Control, Shift and H keys, and four macro results: highlight row, clear filters, timestamp and save backup.ABCDE123456CtrlShiftH++Highlight rowCtrl+Shift+HClear filtersCtrl+Shift+CTimestampCtrl+Shift+TSave backupCtrl+Shift+S
10Ready-to-use macrosCopy the VBA, assign a key and you’re done.
2Platforms coveredMac and Windows key combinations shown for every macro.
1Keystroke per taskInstead of five or six clicks, repeated dozens of times a day.

Getting Started: How to Create a Macro With a Shortcut

If you’ve been using Excel for years, you know that keyboard shortcuts are a game-changer. But did you know you can create your own shortcuts to automate repetitive tasks using macros? With just a few clicks, you can assign keyboard shortcuts to common workflows and supercharge your productivity.

Below are 10 custom Excel macros, each with a real-world use case and a suggested keyboard shortcut you can assign. Every one uses plain VBA, should run in desktop Excel on Mac and Windows, and can be pasted straight into your own workbook.

Record a macro and give it a shortcut

  1. Open the Developer tabGo to Developer → Record Macro. If you can’t see the Developer tab, switch it on in Excel’s options (Customize Ribbon on Windows, Ribbon & Toolbar on Mac).
  2. Name your macroPick a clear name with no spaces, for example HighlightRow.
  3. Assign a shortcut keyType a letter in the Shortcut key box, for example Cmd (Ctrl) + Shift + H. Type the letter in uppercase to get Shift as part of the combination.
  4. Perform the actionsDo the task you want repeated, once and without detours. Excel records each step.
  5. Click Stop RecordingClick Stop Recording, then test the macro on a spare sheet before you rely on it.
Pro tipRecord the smallest useful task you can. Short macros are easier to reuse, easier to fix, and easier to explain to a colleague.

You can also fine-tune or write macros directly in the Visual Basic Editor — just press Fn + Option + F11 on Mac or Alt + F11 on Windows. Once you’re comfortable in the editor, you can go beyond simple recordings and start crafting smarter, more dynamic automations. And when you pair those macros with custom keyboard shortcuts, you unlock an incredibly efficient way to execute repetitive tasks with a single keystroke.

With a bit of creativity, this combination doesn’t just save time — it can streamline your entire workflow, reduce errors, and bring real polish to the way you work in Excel. In this article, I’ll share commonly used shortcuts along with their macro code — but keep in mind, the practical applications are virtually endless.

The parts of a macroA three-line macro. The first line names it with Sub, the middle holds the actions, and End Sub closes it. The shortcut key is set in the Macro Options box, not in the code.Sub HighlightRow()' Your actions go hereEnd Sub1NameLetters, numbers, no spaces2ActionsRecorded or typed VBA runs here3EndEvery Sub closes with End SubShortcut keySet in the Record Macro or Macro Options box, not in the code itself.
Every macro in this article follows this shape. Only the middle changes.

Or paste in the macros from this article

  1. Open the Visual Basic EditorPress Fn + Option + F11 on Mac or Alt + F11 on Windows.
  2. Insert a module and pasteChoose Insert > Module, then paste the code for the macro you want.
  3. Assign the shortcutBack in Excel, press Alt + F8 on Windows (or open Developer > Macros), select the macro, click Options and type your shortcut letter.
  4. Save as a macro-enabled workbookUse File > Save As and choose Excel Macro-Enabled Workbook (.xlsm). A normal .xlsx file drops the macro.

Which shortcut should you build first?

You don’t need all ten on day one. Start with the one that matches the work that annoys you most.

If your day looks like…Build these firstWhy
Reviewing long data tablesHighlight the active row, Jump to last rowKeeps your place in transaction logs and audit sheets.
Cleaning files from other teamsUnmerge all cells, Consistent font, Auto-fit columnsRemoves the formatting that breaks sorting and formulas.
Sending finished reports to clientsConvert to values, Format as table, Save and timestampLocks the numbers in and leaves you a backup.
Logging approvals or QA checksInsert a timestampBuilds a time-stamped audit trail with no typing.
Troubleshooting “rows are missing”Clear all filtersRestores the full dataset in one keystroke.

1. Highlight the Active Row

Mac
Windows
CtrlShiftH

Use Case: When working with large data tables — like transaction logs or audit sheets — it’s easy to lose sight of the row you’re analysing. This shortcut quickly highlights the active row so you can focus visually and return to it after scrolling elsewhere. It’s particularly helpful during meetings, screen shares, or when comparing records line by line.

The macro reads the row number of the active cell and fills the whole row with pale yellow. It doesn’t follow your cursor, so think of it as a quick marker rather than a permanent rule.

Loading code...
Pro tipChange the three numbers in RGB(255, 255, 153) to use your own highlight colour. To remove a highlight, select the row and choose No Fill.

2. Clear All Filters

Mac
Windows
CtrlShiftC

Use Case: Imagine you’re reviewing a heavily filtered sales report. You’re not sure which columns have filters applied, but your data looks incomplete. Instead of hunting through each column filter menu, this shortcut instantly restores the full dataset. It’s also great during troubleshooting when users say, “Some rows are missing.”

ShowAllData reveals every hidden row on the active sheet. The error handling means nothing breaks if no filter is applied, and the filter buttons stay in place so you can filter again straight away.

Loading code...
Watch outIf you filter inside an Excel Table and the filter doesn’t clear, test the macro on a copy of your file first, as tables can behave differently.

3. Convert Formulas to Values

Mac
Windows
CtrlShiftV

Use Case: You have just finished preparing financial forecasts with complex formulas referencing external files. Before sending the sheet to a client or saving for archival, you want to convert everything to static values to avoid reference errors. Select the range, hit the shortcut, and done. No paste special needed.

Setting a range’s Value to itself swaps each formula for the number or text it currently shows. Anything outside your selection is left alone.

Loading code...
Watch outThis can’t be undone, because running a macro clears Excel’s undo history. Run the backup macro (number 10) first, and if part of your selection is an array formula, Excel may refuse to change it.

4. Insert Timestamp in Active Cell

Mac
Windows
CtrlShiftT

Use Case: Great for task tracking, approval logs, and QA checklists. Every time you update or review a row of data, use this shortcut to insert the exact date and time. It creates a transparent, time-stamped audit trail — no need to type anything manually or remember formulas like =NOW().

Unlike =NOW(), which keeps recalculating every time the sheet changes, the value this macro writes is fixed. That’s exactly what an audit trail needs. The code also applies an Australian day/month/year format.

Loading code...
Pro tipWant the date only? Change the format to "dd/mm/yyyy" and use Date instead of Now.

5. Format as Table

Mac
Windows
CtrlShiftQ

Use Case: Working with structured data? Excel Tables come with built-in filter buttons, dynamic ranges for formulas, and visual styling. Instead of navigating through the ribbon to apply table formatting, this shortcut converts any selected range into a proper table — especially handy when preparing reports for clients or managers.

The macro assumes your selection includes a header row and needs at least two rows. If you select a single cell it does nothing rather than guess. It lets Excel choose the table name, so you can run it on many sheets without a name clash.

Loading code...
Watch outExcel can’t create a table over cells that already sit inside one, so select a range outside any existing table.

6. Unmerge All Cells in Sheet

Mac
Windows
CtrlShiftU

Use Case: You receive a spreadsheet from another department, and it’s full of merged cells that break sorting, filtering, and formulas. One press of this shortcut instantly clears all merged formatting so you can reshape the data into something usable. It’s a lifesaver for data cleanup and importing into databases or Power BI.

Only the top-left cell of each merged area keeps its value once it’s unmerged, so you’ll usually need to fill the blank cells down afterwards. The macro covers the whole sheet, not just your selection.

Loading code...
Pro tipRun it on a copy of the sheet if the merged layout carries meaning, such as report headings you still want to keep.

7. Apply Consistent Font & Size

Mac
Windows
CtrlShiftF

Use Case: You’ve just copied data from different sources, and now your worksheet is a visual mess — different fonts, sizes, and formatting. This shortcut standardises everything to a clean, readable style. Ideal for preparing deliverables, consolidating data, or simply making your workbook look professional.

The macro formats the cells you’ve selected, so press Ctrl + A (Cmd + A on Mac) first to cover the whole sheet.

Loading code...
Pro tipSwap Calibri and 11 for your organisation’s house font and size, and every sheet you run it on will match.

8. Auto-Fit All Columns

Mac
Windows
CtrlShiftA

Use Case: Whenever data is imported or pasted in, columns are often too narrow (cutting off content) or too wide. This shortcut instantly resizes all columns to fit their contents — no need to double-click column headers one by one. Great for polishing spreadsheets before sharing or printing.

Auto-fit sizes each column to its longest entry. One very long cell can therefore make a column enormous.

Loading code...
Watch outIf a single long note stretches a column, select just the columns you want and use Home > Format > AutoFit Column Width instead.

9. Jump to Last Row in Sheet

Mac
Windows
CtrlShiftJ

Use Case: In a growing list — like inventory, sales, or time logs — it’s often necessary to jump directly to the last row to add a new entry or review the latest one. This shortcut skips the scroll and lands you exactly where the action is happening.

The macro looks up from the very bottom of column A to find the last filled cell. If column A has gaps, change the 1 in the code to the number of a column that always has data (2 for column B, and so on).

Loading code...
Pro tipPair this with the timestamp macro: jump to the last row, move one cell down, and log your entry in two keystrokes.

10. Save and Timestamp the Workbook

Mac
Windows
CtrlShiftS

Use Case: Before running risky changes (like mass find-and-replace or data transformations), use this shortcut to instantly create a backup version of your file with the current timestamp. It’s an insurance policy that takes less than a second. Also helpful for keeping periodic snapshots of work during long projects.

SaveCopyAs writes a copy without changing the file you’re working in, so you carry on as normal. The copy keeps the same file type and sits in the same folder, named Backup_ followed by the date and time. The folder separator is looked up from Excel, so the same code runs on Mac and Windows.

Loading code...
Watch outSave the workbook once before using this, so it has a folder to copy into. If the file lives on OneDrive or SharePoint, or you’re on a Mac, test it first, as Excel may handle the folder path or ask for permission differently.

Avoiding shortcut clashes

A macro shortcut overrides Excel’s own shortcut with the same keys for as long as that workbook is open. That’s harmless for most of the combinations above, but three of them collide with everyday Excel actions in current Windows versions.

Your shortcutExcel normally uses it to…What to do
Ctrl + Shift + FOpens Format Cells on the Font tabSwap the letter, or accept the override in this workbook.
Ctrl + Shift + UExpands or collapses the formula barSwap the letter if you use a tall formula bar.
Ctrl + Shift + AInserts argument names while you type a formulaSwap the letter if you write formulas by hand.

Add-ins and other macros can claim combinations too, so if a shortcut ever behaves oddly, change the letter and try again.

Bonus Tip: Use Personal Macro Workbook

To use your macros in any workbook, save them in the Personal Macro Workbook. Excel will automatically load them every time you open Excel.

When you record a macro, set Store macro in to Personal Macro Workbook. For a macro you typed or pasted, copy the code into a module in that workbook. Excel creates the personal workbook the first time you record something into it.

Where should your macro live?If you will use the macro in many workbooks, store it in the Personal Macro Workbook. If a colleague needs it too, store it in a macro-enabled .xlsm workbook. Otherwise any .xlsm workbook will do.Will you use it inmany different workbooks?YesSTORE IT INPersonal Macro WorkbookRuns in every file you openNoDoes a colleague needthe same macro?YesSTORE IT INThis workbook (.xlsm)Colleagues must allow macrosNoSTORE IT INAny workbook (.xlsm)Fine for a one-off taskNot sure?Start with the PersonalMacro Workbook. Share itlater by copying it.
Where to store a macro, depending on who needs it.

Common mistakes when building Excel shortcuts

Most macro frustrations come from the same five habits. Here’s what to avoid, and what to do instead.

Saving the file as .xlsx

InsteadSave as Excel Macro-Enabled Workbook (.xlsm), or keep the macro in your Personal Macro Workbook. A plain .xlsx drops the code without warning you twice.

Picking a combination Excel already uses

InsteadCheck the clash table above, then choose a letter nothing else claims. While the workbook is open, your macro wins over the built-in shortcut.

Running destructive macros with no backup

InsteadMacros clear Excel’s undo history, so Ctrl + Z may not rescue you. Run the timestamped backup macro before anything that changes lots of cells.

Hard-coding ranges like A1:D20

InsteadUse ActiveCell, Selection or End(xlUp) so the macro adapts when the data grows or shrinks, as the macros in this article do.

Copying every macro into every workbook

InsteadKeep your everyday macros in the Personal Macro Workbook. You fix a bug once, and the improvement shows up in every file.

When to get help with Excel macros

Shortcuts like these are a great start. If you’re repeating a job that a single macro can’t cover, or a process pulls data from several files, our team can design it properly with custom Excel development.

Frequently asked questions

Do these shortcuts work on both Mac and Windows?

The macros use standard VBA, so they should run in desktop Excel on both. The key combinations differ slightly: on Mac, the Record Macro box may suggest Option + Cmd rather than Cmd + Shift, so use whatever the dialog offers. Test each macro on your own version before relying on it.

Can I use macros in Excel for the web?

No. Excel for the web can’t run VBA macros, so open the file in the desktop app. The shortcuts only exist while the macro does.

Do I need to know VBA to create my own shortcuts?

Not to start. The macro recorder writes the code for you while you work. Typing or editing VBA simply lets you handle more situations, such as the last row of any list. If you’d rather not write code at all, our team can build custom Excel development around your process.

Why does my shortcut do nothing?

The usual causes are that the workbook holding the macro isn’t open (unless it’s in your Personal Macro Workbook), macros are switched off, the file was saved as .xlsx, or the shortcut letter was entered in lowercase so it became Ctrl + letter instead of Ctrl + Shift + letter.

Can I undo a macro?

Usually not. Running a macro clears Excel’s undo history, so keep a backup. The timestamped save macro (number 10) takes less than a second and gives you a way back.

Final Thoughts

Creating your own shortcuts with macros is like unlocking a secret level in Excel. What might take five or six clicks — repeated dozens of times a day — can be reduced to a single keystroke. These automations are invaluable for professionals who work with large volumes of data or follow strict reporting workflows — from analysts and accountants to consultants and operations managers.

The beauty of combining macros with shortcuts is that it scales with your needs. Start small with one or two time-savers, then gradually create a toolkit of personalised automations tailored to your role and your team. Over time, it becomes second nature — and you’ll wonder how you ever worked without them.

About the Author

Daniel Thomas is a developer at Office Experts, a curious mind into the world of programming, design and SEO. If you have any questions, please feel free to get in contact via the form below.

Contact Us

Get in touch with our team for general enquiries and support. We're here to help with any questions you might have about our services.

Need to attach a file?

Need pricing for a specific project? Fill out our quote form and we'll provide you with a detailed estimate tailored to your needs.