I’m a huge fan of using shortcuts in Excel to speed up my work
While there are many shortcuts that I use on a daily basis, one that I find particularly useful is the ability to repeat the last performed action in Excel.
This is useful when you have to do the same thing repeatedly (such as applying formatting to a cell/row or deleting rows/columns selectively).
In this short tutorial, I will show you a couple of ways you can repeat the last action that you have done.
The easiest way would be to use a simple keyboard shortcut or add an icon to the Quick Access Toolbar, where it would repeat your last action with a single click.
Repeat the Last Action Using Keyboard Shortcuts
While you can repeat many different types of actions, let me take an example where I would fill color in a cell and then need to repeat it multiple times.
Below I have a data set where I have some names in column A and their sales values in column B, and I want to manually highlight some of the names in this data:
Here are the steps to do this:
- Select the cell you want to highlight
- Click the Home tab
- Click on the fill color icon and choose and choose the color.
This will highlight the selected cell as shown below:
Now if I also want to highlight a couple of other cells in this data set, I don’t need to repeat the steps above.
In its memory, Excel already remembers the last action I took, and I can simply repeat that step.
Let me now show you two keyboard shortcuts to repeat the last action.
Using the F4 Key
The easiest way to repeat the last section is by using the below keyboard shortcut:
F4 (in Windows)
If you’re using a Mac, see the next section for the shortcut.
Here is how to use this:
- Perform the action once as you would regularly do. In our example, we highlighted a cell (as shown in the previous section)
- Select the cell where you want to repeat the same action
- Press the F4 key on your keyboard
You can repeat the last step multiple times using the same F4 key.
For example, if you want to highlight cells A4, A6, and A9, select these cells one by one and keep pressing the F4 key to fill the same color to these cells.
Note: In case you have the function key (fn) enabled on your keyboard, you will have to hold the function key and then press the F4 key to repeat the last action
Using Control + Y
Another keyboard shortcut you can use to repeat the last action is
Control + Y (in Windows)
Command + Y (in Mac)
To use this shortcut, you need to select the cells or range of cells where you want to repeat the last action, then hold the Control key, and then press the Y key.
Personally, I prefer using the F4 Key, but I have seen some people use this instead.
Using the Repeat Icon from Quick Access Toolbar
If you are not a fan of learning new keyboard shortcuts, let me show you another method to repeat the last action.
You can add the Repeat command in the Quick Access Toolbar (QAT) so that you can access it with the click of a button (and it’s always visible since the QAT always remains visible).
Below are the steps to add the repeat command to the Quick Access Toolbar:
- Click on the ‘Customize Quick Access Toolbar’ icon in the QAT.
- Click on the Customize option.
- In the Excel Options dialog box, click on the ‘Choose commands from’ drop-down.
- Select the All Command options.
- Scroll down the list of commands and select the Repeat command
- Click the Add button.
- Click OK
The above steps would add the Repeat command in the Quick Access Toolbar, and you can repeat the last action by clicking on this icon.
Note: Remember that Excel can only repeat the last action that you performed. It cannot be used to repeat the last two or last three actions.
Some Frequently Asked Questions
Here are some common questions I have seen people ask about repeating the last action and using the shortcuts in Excel
What are some day-to-day tasks that can be repeated?
Below I have some everyday tasks where using the methods shown in this article to repeat the last action would be useful:
- Formatting – tasks such as filling a color, applying a border, making the cell bold/italicized
- Alignment – changing the alignment of the cells or changing the indentation in the cells
- Deleting Rows/Columns – You can delete one row/column and can then continue to delete more rows/columns by simply selecting them and then repeating the last action.
Also read: Delete Blank Rows in Excel
Would these methods also work in other Microsoft applications such as MS Word or MS Powerpoint?
Yes, the methods covered in this article for Microsoft Excel would also work with other Microsoft applications such as MS Word or MS Powerpoint, or MS Project.
All these applications also have a Quick Access Toolbar, so you can also add the repeat command icon to the QAT in these applications as well.
How can I repeat multiple steps instead of just the last one?
If you want to repeat multiple steps, the best way would be to record a macro or write the VBA code and then run the VBA code every time you want to repeat those series of steps.
You can also assign a keyboard shortcut to the macro and run it using the assigned shortcut.
Other Excel articles you may also like: