LearnExcel.io
Menu

How to Swap Rows in Excel

Written by ··Updated June 16, 2026
How to Swap Rows in Excel

To swap two rows in Excel, hold Shift and drag a selected row by its border to drop it between other rows without overwriting them, or Cut the row (Ctrl+X / Cmd+X) and use Insert Cut Cells at the destination. Both methods reorder rows safely instead of pasting over existing data.

If you’re looking for a quick and efficient way to swap two rows in Excel, you’ve come to the right place. Excel is a powerful tool that can help you get your work done quickly and accurately, so mastering its functions is essential. Swapping rows in Excel is a routine task that can be done in a few simple steps.

Step 1: Identify the Rows You Want to Swap

The first step to swapping rows in Excel is to identify which rows you want to swap. To do this, simply locate the row numbers of the two rows you want to swap. For example, if you want to swap rows 3 and 5, take note of their row numbers.

Step 2: Select the Rows You Want to Swap

Once you’ve identified the rows you want to swap, select them. You can do this by clicking and dragging your mouse over the row numbers on the left-hand side of the Excel sheet. Alternatively, you can select them by clicking on the first row number, holding down the “Shift” key, and clicking on the second row number. If you need to grab several at once, see how to select multiple rows in Excel.

Step 3: Cut and Paste the Rows

With the rows selected, right-click anywhere within the selection and choose “Cut” or press “Ctrl+X” on your keyboard. Next, navigate to the row where you want to move the first row and right-click it. Then, choose “Insert Cut Cells” or “Insert Cut Copied Cells”. You will see that the contents of the two rows have been swapped. This is the same approach you would use to move rows in Excel without replacing the destination data.

Alternative Method: Using the Drag and Drop Feature

If you prefer, you can use the drag and drop feature to swap rows in Excel. First, select the row you want to move by clicking on its row number. Then, move your mouse pointer over the edge of the highlighted selection until you see a four-way arrow. To slide the row into place between two existing rows instead of overwriting one, hold the Shift key while you drag, then release the mouse button. The rows will be swapped. The same drag technique works to move rows in Excel and to move columns in Excel.

Pro Tip: Use the Keyboard Shortcut

If you frequently need to swap rows in Excel, you might find it easier to use the keyboard shortcut. First, select the row you want to move. Then, press “Alt” and “Shift” on your keyboard. While holding these keys, use the up or down arrow keys to move the row to its new location. When you release the keys, the rows will be swapped.

When to Swap Rows in Excel

Swapping rows in Excel can be helpful if you need to reorganize your data or change its order. For example, if you have a table that is sorted by a specific column and you want to move a row to a different position, you might consider swapping the rows to maintain the correct sorting order. If you simply want the whole table reordered, it is often faster to sort rows in Excel rather than swapping them one pair at a time.

Things to Keep in Mind Before Swapping Rows in Excel

Before swapping rows in Excel, there are a few things you should keep in mind. First, make sure you have a backup copy of your data in case anything goes wrong. Additionally, if the rows you are swapping contain data that is linked to other cells or formulas, you might need to update those links after the swap. Finally, be careful not to accidentally delete any rows or cells in the process of swapping rows.

Other Useful Excel Functions

Excel is a powerful tool that offers a wide range of functions beyond swapping rows. Some of the other useful functions include sorting and filtering data, creating charts and graphs, using formulas and functions, and creating pivot tables. Mastering these functions can help you work more efficiently in Excel and achieve your goals faster.

Swapping rows in Excel is a simple and straightforward process that can save you time and effort when working with data. By following the steps outlined above, you can easily swap two rows of data in Excel and achieve your desired result. However, it is important to keep in mind the considerations mentioned above and to explore other functions available in Excel for an even more efficient workflow.

FAQs About Swapping Rows in Excel

Can I use the same process to swap columns in Excel?

The drag and cut-and-paste methods above work for columns too — select a column, hold Shift, and drag its border to a new position, or Cut it and use Insert Cut Cells. For a full walkthrough, see how to swap columns in Excel and how to move columns in Excel. (The “Transpose” paste option is a separate feature used to convert columns to rows, not to swap two columns side by side.)

What should I do if I accidentally delete a row while swapping rows in Excel?

If you accidentally delete a row while swapping rows in Excel, you can use the “Undo” function by pressing “Ctrl+Z” on your keyboard. This will undo your last action, including the deletion of the row. If you have already saved the workbook and closed Excel, you may be able to retrieve the deleted row from an earlier version of the file.

Can I use the same process to swap multiple rows in Excel?

Yes, you can use the same process to swap multiple rows in Excel. Simply select all the rows you want to swap and use the same cut and paste or drag and drop method to move the rows to their desired locations.

What happens to other data if I swap rows that have formulas?

If you swap rows that have formulas, the formulas will move with the rows. However, you may need to update any cell references in the formulas that refer to cells outside the swapped rows. Double-check your formulas to ensure they are still valid after swapping the rows.

Is there an easy keyboard shortcut for swapping rows in Excel?

Yes, there is an easy keyboard shortcut for swapping rows in Excel. First, select the row you want to move. Then, press “Alt” and “Shift” on your keyboard. While holding these keys, use the up or down arrow keys to move the row to its new location. When you release the keys, the rows will be swapped.

How do I swap rows without overwriting the destination data?

Use the Shift+drag method. Select the entire row by clicking its row number, move your pointer to the row’s border until the four-way (move) cursor appears, then hold Shift and drag it between two existing rows — Excel inserts it there and pushes the other rows down instead of pasting over them. This is the safest way to reorder data and mirrors the technique used to move entire rows in Excel.

How do I swap rows in Excel on a Mac?

The steps are the same on macOS. Select the row by its number, hold Shift, and drag the border to the new position, or use Cmd+X to cut and then Control-click (or right-click) the destination row and choose Insert Cut Cells. The drag-and-drop and cut-and-insert behaviors match Windows, just with the Cmd key in place of Ctrl. See more Mac-specific guidance in how to insert a row in Excel on Mac.

How do I verify the rows swapped correctly?

After swapping, check that each value still sits in the right column and that no row was overwritten or left blank. If anything looks off, press Ctrl+Z (Cmd+Z on Mac) to undo and try again, and double-check any formulas that referenced the moved rows so their cell references are still valid.

Related guides

View all Excel Basics and General Knowledge guides →