How to Move Columns in Excel
Using Excel in our daily work makes us realize that no matter how planned and Logical we try to make our spreadsheet, in the end, we need to shuffle the rows and columns every once in a while. We can always hide the columns and rows wherever required, but most of the time, we need to move the entire columns and rows for logical reasons. In this topic, we will learn about Moving Columns in Excel in essential ways.
Excel does not have a separate command or function for performing the moving of columns and rows action. Dragging the column does not work in Excel.
However, there are several ways to move the columns in Excel. They are explained below.
Moving Columns through Swapping
Dragging columns in Excel is a complicated procedure. It is trickier than one can think of. Let’s understand this method with the help of an example.
In the snapshot below, we have an inventory list of a company. The Columns contain details such as Inventory ID, Name, Description, Unit Price, Quantity in Stock, Inventory Value, etc., and the rows contain the details of the columns.
So now we want to swap certain columns among each other like we need to swap the Inventory Value column in the F Column with Unit Price. We need to follow certain steps to do so. We need to select the column we need to move, which in our case is the F column; after we have selected the column, we need to place the cursor on the edge of the selection. The mouse cursor changes from the normal cursor to the move cursor. Press and hold the shift key, and while holding the shift key, drag the column to the desired location where you need to swap the column. Once you start dragging the column, a green-colored symbol will appear, indicating where to place the column. Release the mouse button, and the columns will be swapped to the new location.
Which, in our case, is the D Column? As we can see from the snapshot above. The column has been swapped as per our requirement. The same process must be followed to move the rows to desired locations.
Moving Columns through Cutting & Pasting
We can also move the columns using the cut & Paste Command in Excel. Let us understand this with the help of the same example.
Step 1: Select the column you need to move by clicking on the column header and then use the Cut command by pressing Control+X or by choosing the Cut command after right-clicking on the column header.
Step 2: After we have used the cut command, we need to select the column “before,” which we need to insert the cut column. Right-click on the header and choose ‘Insert Cut Cells’ from the right-click menu.
As a result, the columns are moved to our desired location, as shown in the screenshot. The same process must be followed to move the rows to desired locations.
Moving Multiple Columns in Excel
Many times we have to move multiple columns in Excel. It is possible to move the multiple columns or rows provided they are adjacent. Let us understand this with the help of our previous example.
Step 1: For moving multiple columns, we need to select the adjacent columns which we need to move, which in our case, are columns F, G, and H.
Step 2: After we have selected the column, we need to place the cursor on the edge of the selection. The mouse cursor changes from the normal cursor to the move cursor.
Step 3: Press and hold the shift key, and while holding the shift key, drag the column to the desired location where you need to swap the column. Release the mouse button, and the columns will be swapped to the new location. The selected columns are moved to the new ones, D, E, and F, as shown below.
With the help of this example, we can understand that the same process as moving a single column needs to be followed for moving multiple columns as well. The only difference is in the selection of the columns. As explained above, the same process needs to be followed for multiple columns while using the cut and paste command for moving the columns. We just have to select the multiple columns together and move.
Things to Remember
We need to remember certain things for using the move column command in Excel.
Moving non-adjacent columns & rows is impossible in Excel, so we can only swap or move the columns side by side to one another. If we try and use the control key for selecting non-adjacent rows and columns and use the cut command, the following error pops up, as shown in the screenshot below.
We can use the Control+Space Command to select the entire column all at once.
It is also to be noted that we cannot move or swap columns that contain merged cells. If we try moving the columns or rows which contain merged cells, the following error pops up, as shown in the screenshot below.
We can also use (Virtual Basic For Application) VBA, the programming language for Excel, for moving or swapping columns and rows. We need to write the macros that would automatically move the columns and rows in Excel. However, this is a more lengthy and, impractical, time-consuming method. And even after writing down the macros, the macros we have used don’t need to be 100% accurate, which might lead to the failure of the task. Hence it is not advisable to use VBA for this particular function.
While using the Cut Paste command for moving the cells, it is advisable to check which column the right click pop up is used. Please, note that Excel pastes the Cut Cells Before the selected column.
This has been a guide to Moving Columns in Excel. Here we discussed Moving Columns through Swapping, cutting, and pasting, and Moving Multiple Columns in Excel. You may also look at these useful functions in Excel –
- Switching Columns in Excel
- Matching Columns in Excel
- COLUMNS Formula in Excel
- Grouping Columns in Excel