How To Swap Two Rows in Excel

Microsoft Excel is the ideal app for handling large amounts of data. You can use it to get a great deal of work done in no time, as long as you know which functions to use. But it can be hard to master because there are many features and commands to learn.

How To Swap Two Rows in Excel

Mistakes happen easily during data entry, and you will probably need to swap rows (or columns) sooner or later. Fortunately, this is one of the easiest things you can do in Excel. Keep reading to learn how to swap two rows in two different ways. You can use the same methods to swap columns as well.

The Imaginary Problem

To illustrate these methods, we have created an Excel file pretending we are a system administration service that keeps track of active servers. We filled in a few rows to give you an idea of how things work. Let’s pretend that the information for Computer 7 and Computer 5 has been mixed up and that you want to correct the mistake.

Note that the first row in our example is used for category labels, so Computer 5 and its data are placed in row 6, while Computer 7 is in row 8.

basic

Let’s move on to the methods.

Copy/Paste

The first method is used for many different operations in Excel. It is straightforward and takes only a few seconds to complete. You can use it to swap entire rows or columns at once, rather than switching the data cell by cell.

This method simply requires you to copy the information from one row and paste it into the other. But first, you will need to create an empty row and place the data there.

Here is precisely what you have to do if you want to swap the data associated with Computer 5 and with Computer 7:

  1. Insert a new row between Computers 4 and 5. Do it by right-clicking on row 6 and selecting the “Insert” option. Your empty row will be row 6.
  2. Adding a new row moved “Computer 7” from row 8 to row 9. Find this row and cut out the info from columns B, C, and D. You can select the cells with your mouse or with the Shift button, and then press “Ctrl+X” to cut.
  3. Click cell B6 in the newly created row 6 and press “Ctrl+V.” The data from Computer 7 will move to row 6.
  4. The data for Computer 5 moved a row below as well, which means you want to select cells B7, C7, and D7 to get the data for Computer 5. Press “Ctrl+X” again.
  5. Select the empty cell next to Computer 7 (that is, cell B9) and press “Ctrl+V.”
  6. Copy cell A7 and paste it into the empty cell above (in our example, this is the label “Computer 5”).
  7. Right-click on the now-empty row 7 and select “Delete.”

You have just moved the contents from one row to another with a few clicks. You can use the same technique to swap data between columns. This method is especially helpful when you’re working on long Excel lists with hundreds of rows and columns because it allows you to swap every cell in your row at the same time. To select an entire row in Excel, press Shift+Space.

end result

Swapping Adjacent Rows or Columns

Swapping data between adjacent rows is much easier because you don’t have to create a new row at all. Excel allows you to swap the data between two columns or rows in seconds by holding Shift on your keyboard. Here is what you have to do:

  1. Select the data you want to swap.
  2. Press and hold the “Shift” key on your keyboard.
  3. Hover your mouse over the border between the two adjacent rows until it turns into a cross-arrow icon.
  4. Click and hold your mouse and “Shift” until you see a gray line appear under the row you want to switch the data with.
  5. Let go of the mouse button, and the data will switch places. You can use the same method to swap between columns.

The Road to Becoming an Excel Pro

If your job requires you to work in Excel, you will have to learn various ways to make data management tasks faster and easier. This may seem daunting, but you can find YouTube tutorials that will teach you how to do just about anything you want.

Don’t Give Up

Learning how to use Excel to its full extent can make you irreplaceable at your workplace. Switching data between rows and columns is only the first step, but it’s an important one for sure.

Do you use Excel often? What are your favorite tips you would like to share with others? Tell us how to improve our Excel skills in the comment section below.

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.