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.
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.
Let’s move on to the methods.
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:
- 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.
- 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.
- Click cell B6 in the newly created row 6 and press “Ctrl+V.” The data from Computer 7 will move to row 6.
- 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.
- Select the empty cell next to Computer 7 (that is, cell B9) and press “Ctrl+V.”
- Copy cell A7 and paste it into the empty cell above (in our example, this is the label “Computer 5”).
- 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.
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:
- Select the data you want to swap.
- Press and hold the “Shift” key on your keyboard.
- Hover your mouse over the border between the two adjacent rows until it turns into a cross-arrow icon.
- Click and hold your mouse and “Shift” until you see a gray line appear under the row you want to switch the data with.
- 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.