How to Repeat Previous Command in Excel?

The user may press the Repeat icon on the Excel spreadsheet.

Author: Devang Shekhar
Devang  Shekhar
Devang Shekhar
I am a third year undergraduate at Indian Institute of Technology Kharagpur, enthusiastic about Finance, Economics, Data Analytics and Entrepreneurship.
Reviewed By: Wissam El Maouch
Wissam El Maouch
Wissam El Maouch

Procurement Analyst Intern for Energy Storage | Chemical Engineering | Energy Economics and Management

Last Updated:June 16, 2023

Microsoft Excel is a software that has gained widespread use as a spreadsheet tool. Using drawing charts or graphs, data can be organized, formatted, and analyzed methodically. With its added features to perform arithmetic calculations on varying forms of data, Excel is an essential tool.

Microsoft Excel provides many functions for performing arithmetic operations and several other types of calculations on our data, making our life easier while performing complex tasks with large amounts of data.

The applications and advantages of using Excel are countless. We can perform complex calculations and create tables, graphs, charts, and models for our project.

Officially released on November 19, 1987, Microsoft Excel has constantly undergone a continuous stream of enhancements in its functionality and user experience by introducing newer versions every 2 or 3 years. This makes Excel more efficient and easy to work for businesses and working professionals.

With every new update, excel has further evolved into a more user-friendly and learnable software tool.

Using Excel enables us to generate uncomplicated charts and graphs that foster the comprehension of complex data sets. Visualizing the information this way makes it more intuitive and accessible for analysis.

Key Takeaways

  • Microsoft Excel provides one of the best ways to store data, perform calculations, visualize it with charts and graphs, and analyze it more systematically.

  • Since its launch, Microsoft has released more than 14 versions of Excel. Every new version has more advanced and updated functions, making Excel more user-friendly and an easy-to-understand software tool.

  • Repeating the previous command is an essential function in Excel as it helps us to avoid typing the same formula or formatting on each cell of the spreadsheet, saving our time and increasing our working efficiency.

  • We can repeat our last action in Excel by either using the keyboard shortcuts Ctrl+Y or F4(for the Windows operating system) and command button+Y(for the Mac operating system) or by directly using the Repeat function.

Methods of Repeating the Previous Command in Excel

To calculate similar quantities across various datasets or timeframes on an Excel sheet, the user has to enter identical commands or formulas repeatedly across numerous cells - a process that can prove taxing for busy students and professionals alike.

Unfortunately, typing the same command over multiple cells is ineffective and incredibly time-consuming, making it a less ideal option for those aiming for maximum efficiency.

Hence to avoid this inconvenience and unnecessary consumption of time, repeating commands is an essential function in Excel while working on a spreadsheet.

It is especially very important when we need to do many similar tasks repeatedly while working on an Excel spreadsheet, like inserting a row or column, copying and pasting, etc.

There are two methods by which we can repeat a command in an Excel spreadsheet:

  1. By using a shortcut key
  2. By using the Repeat command

We can use any of the two methods mentioned above to repeat a command in Excel. 

Repeating Previous Action in Excel by using Shortcut keys

Shortcut keys are simply a combination of two or more keys on the keyboard, which helps to run commands more easily while working on any Microsoft application such as Excel, Word, etc.

Many shortcut keys are available for running various commands and functions in Excel. The shortcut key for executing something may vary depending on the operating system you are working on.

We can repeat the previous command or formula in Excel by using a combination of shortcut keys, for which we should press and hold the following keys together depending upon the operating system we are working on:

Keyboard Shortcut In Excel
Operating System Keyboard Shortcut
Windows F4 or Ctrl + Y
Mac Command key + Y

Hence, to repeat any command in Excel, we need to press Ctrl+Y on the Windows operating system, and the command key+Y on the Mac operating system.

These shortcuts help us a lot while working on Excel, as we can directly execute the desired function by pressing a combination of buttons on the keyboard. This also sometimes helps us to save time.

Repeating Previous Action in Excel by using the Repeat Command

Apart from using the keyboard shortcut keys, we can also repeat the last action in Excel by using the Repeat command. If a user prefers to use the mouse instead of the keyboard, the user may press the Repeat icon on the Excel spreadsheet.

To do so, we first need to add the Repeat command option on the top menu bar of the Excel worksheet, also known as the Quick Access Toolbar, as, by default, this command is hidden on the top ribbon of the Excel page.

After the Repeat command appears on the quick access toolbar, we can click on it to repeat the last action as many times as we want.

To add the repeat command on the quick access toolbar, proceed as follows:

1. Click on the “Customize Quick Access Toolbar” button (the small drop-down arrow) on the top of the menu bar of the Excel worksheet.

2. In the drop-down menu, select the More Commands option from the list.

Spreadsheet showing that how to add the repeat command in the quick access toolbar.

3. From the list of options available in Popular Commands, scroll down and select the Repeat function.

4. After selecting the Repeat command, click on Add>> option. This adds the Repeat command to the list of items on the right, which shows those options which are visible on the Quick Access Toolbar.

5. After this, click on Ok. The Repeat command is now visible on the Quick Access Toolbar.

Spreadsheet showing the Repeat command in the Quick Access Toolbar.

We can now easily repeat the previous command or formula entered on one cell multiple times and on multiple other cells by simply clicking this icon.

Examples of Repeating the Previous Action in Excel

Let us suppose we have hypothetical data of 12 employees of a company, their year of joining, and their present annual salary as shown:

Spreadsheet showing the Examples of Repeating the Previous Action in Excel.

If you want to insert multiple empty rows in this data, follow the below-mentioned steps:

1. Select the row above which you want to insert a blank row. Suppose we want to insert a row above row 3. (To select an entire row, click on the corresponding row number mentioned on the left)

Spreadsheet showing that how to insert multiple empty rows in this data.

2. Right-click on the selected row and then select the Insert option.

Doing this adds a new row above row 3, as shown below:

Spreadsheet showing how to add a new row above row 3.

3. To repeat this action again, either press Ctrl+Y (or F4) on the keyboard, for the Windows operating system, or click the Repeat command icon on the Quick Access Toolbar, which we just enabled. Doing this adds another row above row 3.

Spreadsheet showing that how to repeat action again.

Hence in this way, we can repeat the last action or formula multiple times in Excel.

Researched and authored by Devang Shekhar | LinkedIn

Reviewed and Edited by Wissam El Maouch | LinkedIn

Free Resources

To continue learning and advancing your career, check out these additional helpful WSO resources: