• Macro names should only consist of alphanumeric characters and underscores,
i.e. 'a-z', 'A-Z', '0-9', and '_',
• Not more than 255 characters long
• The first character of a Macro should not be a digit.
• Can’t use reserved names
Avoid these Key Combinations when associate a macro with a key shortcut
A lot of letters are already used in Excel with CTRL or CTRL+SHIFT key combination.
So here is a list of key combinations with letters. You want to avoid associating a macro
with the following combinations:
Ctrl combination shortcut keys
Ctrl+PgDn Switches between worksheet tabs, from left-to-right.
Ctrl+PgUp Switches between worksheet tabs, from right-to-left.
Ctrl+Shift+& Applies the outline border to the selected cells.
Ctrl+Shift_ Removes the outline border from the selected cells.
Ctrl+Shift+~ Applies the General number format.
Ctrl+Shift+$ Applies the Currency format with two decimal places (negative numbers
in parentheses).
Ctrl+Shift+% Applies the Percentage format with no decimal places.
Ctrl+Shift+^ Applies the Scientific number format with two decimal places.
Ctrl+Shift+# Applies the Date format with the day, month, and year.
Ctrl+Shift+@ Applies the Time format with the hour and minute, and AM or PM.
Ctrl+Shift+! Applies the Number format with two decimal places, thousands
separator, and minus sign (-) for negative values.
Ctrl+Shift+* Selects the current region around the active cell (the data area
enclosed by blank rows and blank columns). In a PivotTable, it selects the entire
PivotTable report.
Ctrl+Shift+: Enters the current time.
Ctrl+Shift+" Copies the value from the cell above the active cell into the cell or
the Formula Bar.
Ctrl+Shift+Plus (+) Displays the Insert dialog box to insert blank cells.
Ctrl+Minus (-) Displays the Delete dialog box to delete the selected cells.
Ctrl+; Enters the current date.
Ctrl+` Alternates between displaying cell values and displaying formulas in
the worksheet.
Ctrl+' Copies a formula from the cell above the active cell into the cell or
the Formula Bar.
Ctrl+1 Displays the Format Cells dialog box.
Ctrl+2 Applies or removes bold formatting.
Ctrl+3 Applies or removes italic formatting.
Ctrl+4 Applies or removes underlining.
Ctrl+5 Applies or removes strikethrough.
Ctrl+6 Alternates between hiding and displaying objects.
Ctrl+8 Displays or hides the outline symbols.
Ctrl+9 Hides the selected rows.
Ctrl+0 Hides the selected columns.
Ctrl+A Selects the entire worksheet.
If the worksheet contains data, Ctrl+A selects the current region. Pressing Ctrl+A a
second time selects the entire worksheet. When the insertion point is to the right of a
function name in a formula, displays the Function Arguments dialog box.
Ctrl+Shift+A inserts the argument names and parentheses when the insertion point is
to the right of a function name in a formula.
Ctrl+B Applies or removes bold formatting.
Ctrl+C Copies the selected cells.
Ctrl+D Uses the Fill Down command to copy the contents and format of
the topmost cell of a selected range into the cells below.
Ctrl+E Adds more values to the active column by using data surrounding
that column.
Ctrl+F Displays the Find and Replace dialog box, with the Find tab selected.
Shift+F5 also displays this tab, while Shift+F4 repeats the last Find action.
Ctrl+Shift+F opens the Format Cells dialog box with the Font tab selected.
Ctrl+G Displays the Go To dialog box. F5 also displays this dialog box.
Ctrl+H Displays the Find and Replace dialog box, with the Replace tab selected.
Ctrl+I Applies or removes italic formatting.
Ctrl+K Displays the Insert Hyperlink dialog box for new hyperlinks or the
Edit Hyperlink dialog box for selected existing hyperlinks.
Ctrl+L Displays the Create Table dialog box.
Ctrl+N Creates a new, blank workbook.
Ctrl+O Displays the Open dialog box to open or find a file.
Ctrl+Shift+O selects all cells that contain comments.
Ctrl+P Displays the Print tab in Microsoft Office Backstage view.
Ctrl+Shift+P opens the Format Cells dialog box with the Font tab selected.
Ctrl+Q Displays the Quick Analysis options for your data when you have cells
that contain that data selected.
Ctrl+R Uses the Fill Right command to copy the contents and format of
the leftmost cell of a selected range into the cells to the right.
Ctrl+S Saves the active file with its current file name, location, and file format.
Ctrl+T Displays the Create Table dialog box.
Ctrl+U Applies or removes underlining.
Ctrl+Shift+U switches between expanding and collapsing of the formula bar.
Ctrl+V Inserts the contents of the Clipboard at the insertion point and
replaces any selection. Available only after you have cut or copied an object, text, or
cell contents.
Ctrl+Alt+V displays the Paste Special dialog box. Available only after you have cut
or copied an object, text, or cell contents on a worksheet or in another program.
Ctrl+W Closes the selected workbook window.
Ctrl+X Cuts the selected cells.
Ctrl+Y Repeats the last command or action, if possible.
Ctrl+Z Uses the Undo command to reverse the last command or to delete
the last entry that you typed.