How to swap columns in excel
Tutor 5 (120 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To swap columns in Excel, select the first column, cut it using Ctrl+X (Windows) or Cmd+X (Mac), select the destination column, right-click, and choose "Insert Cut Cells."
Methods to Swap Adjacent Columns
Using Cut and Insert
- Click the column header letter to select the entire first column
- Press Ctrl+X (Windows) or Cmd+X (Mac) to cut the column
- Click the header of the column where you want to move it
- Right-click the selected column header
- Choose "Insert Cut Cells" from the context menu
Using Drag and Drop
- Select the column by clicking its header letter
- Move your cursor to the column border until it becomes a four-sided arrow
- Hold the Shift key
- Drag the column to its new position
- Release the mouse button when you see the green insertion line
Methods to Swap Non-Adjacent Columns
Using a Helper Column
- Insert a blank column next to one of the columns you want to swap
- Cut the first column using Ctrl+X (Windows) or Cmd+X (Mac)
- Paste it in the blank column location
- Cut the second column
- Paste it in the original position of the first column
- Move the first column from the helper location to the second column's original position
- Delete the helper column
Using Copy and Paste Special
- Select the first column
- Press Ctrl+C (Windows) or Cmd+C (Mac) to copy
- Select a blank area and paste the column
- Repeat for the second column
- Copy the temporarily stored first column
- Paste it in the second column's original location
- Copy the temporarily stored second column
- Paste it in the first column's original location
- Delete the temporary columns
How to Swap Multiple Columns Simultaneously
To swap multiple columns simultaneously, select all columns you want to move by clicking the first column header and dragging across to the last column, then use the cut and insert method.
- Click the first column header
- Hold Shift and click the last column header in your selection
- Press Ctrl+X (Windows) or Cmd+X (Mac)
- Click the destination column header
- Right-click and select "Insert Cut Cells"
Keyboard Shortcuts for Column Swapping
Windows shortcuts:
- Ctrl+X: Cut selected column
- Ctrl+V: Paste column
- Ctrl+Z: Undo last action
- Ctrl+Spacebar: Select entire column
- Shift+Spacebar: Select entire row
Mac shortcuts:
- Cmd+X: Cut selected column
- Cmd+V: Paste column
- Cmd+Z: Undo last action
- Ctrl+Spacebar: Select entire column
- Shift+Spacebar: Select entire row
Common Issues When Swapping Columns
Formulas Breaking After Swap
Formulas with absolute references (A$1) maintain their references after swapping. Formulas with relative references (A1) adjust automatically to the new position. Mixed references ( A1 or A$1) partially adjust based on the locked component.
Merged Cells Preventing Swap
Merged cells block column swapping operations. Unmerge all cells in the affected columns before attempting to swap. Access unmerge through Home tab > Merge & Center dropdown > Unmerge Cells.
Protected Sheets Restrictions
Protected worksheets prevent column modifications. Unprotect the sheet through Review tab > Unprotect Sheet. Enter the password when prompted. Reapply protection after completing the swap.
Alternative Methods Using Excel Features
Using the Sort Function
- Add a helper row with numbers indicating the desired column order
- Select all data, including the helper row
- Navigate to the Data tab > Sort
- Choose "Options" and select "Sort left to right"
- Sort by the helper row
- Delete the helper row after sorting
Using Power Query
- Select your data range
- Navigate to the Data tab > From Table/Range
- Open Power Query Editor
- Drag column headers to reorder them
- Click "Close & Load" to apply changes
Power Query preserves data types during column reordering. Changes remain dynamic with source data updates when using Power Query connections.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to track changes in excel
Answers · 1
How to lock certain cells in excel
Answers · 1
How to merge two excel spreadsheets
Answers · 1
Where is the name box in excel
Answers · 1