Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Trending
  • NEWS
  • Blogs
  • Tips & Tricks
  • Website & Apps
  • Tech Tips
  • Tech Blogs
  • ChatGPT Blogs
  • Tech News
  • AI News
  • ChatGPT News
  • ChatGPT Tutorial
Open In App
Next Article:
How to Combine Two Columns in Excel (6 Methods Explained )
Next article icon

How to Swap Columns in Excel: 3 Methods Explained

Last Updated : 03 Dec, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

To Swap Columns in Excel - Quick Steps

  • Drag and Drop: Select a column, drag it to a new position, and release.
  • Cut and Paste: Cut a column (Ctrl + X) for Windows and (Cmd + X) for Mac, then paste it in the new location using Insert Cut Cells.
  • Copy and Paste: Copy a column, then insert the copied cells in the new location.

Swapping columns in Excel is a powerful yet often overlooked feature that can help you reorganize your data quickly and efficiently. Whether you’re working with large datasets or just need to adjust the layout of your spreadsheet, knowing how to swap columns can save you time and effort.

In this article, we’ll show you three different methods to swap columns in Excel. From simply dragging and dropping to using a helper column and even the ‘Cut’ and ‘Insert Cut Cells’ feature, these methods will help you seamlessly reorganize your columns without affecting your data.

How-to-Swap-Columns-in-Excel

Table of Content

  • Method 1: Using ‘Cut’ and ‘Insert Cut Cells’ to Swap Columns in Excel
  • Method 2: Drag-and-Drop to move columns in Excel
  • Method 3: Move Columns in Excel using Helper Column
  • Change the Columns Order in Excel using VBA

Method 1: Using ‘Cut’ and ‘Insert Cut Cells’ to Swap Columns in Excel

The Cut and Insert Cut Cells method allows you to swap entire columns with just a few clicks. This method is especially useful when you need to rearrange columns quickly while maintaining the integrity of your data.

Step 1: Select the First Column to Move

Click on the column letter of the column you want to move. For example, if you want to swap columns D and B, start by clicking the column letter D.

Swap Columns in Excel
Select the Column you want to move

Step 2: Cut the Selected Column

After selecting the column, right-click and choose Cut from the context menu. Alternatively, you can use the keyboard shortcut Ctrl + X (For Windows) or Cmd + X (For Mac) to cut the column.

Swap Columns in Excel
Right Click and Choose Cut the Cells

Step 3: Select the Destination Column

Click on the column letter where you want to move the cut column.

Step 4: Insert the Cut Column

Right-click on the destination column where you want to place the cut column. Choose Insert Cut Cells from the context menu. This will insert the cut column in the new position, pushing the existing columns to the right.

Swap Columns in Excel
Right Click >> Select Insert Cut Cells

Step 5: Complete the Swap

After you’ve inserted the cut column, you may want to repeat the process for the other column to complete the swap.

Swap Columns in Excel
Column Inserted

Method 2: Drag-and-Drop to move columns in Excel

Swapping columns by dragging is one of the simplest ways to rearrange your data in Excel. This method allows you to quickly move entire columns just by dragging them to a new position and automatically rearrange columns in Excel. This technique is ideal when you want to swap two columns without altering or disrupting the data inside them. Follow the below steps to Move columns by Dragging.

Step 1: Enter Data into the Sheet

Enter Data in to MS Excel Spreadsheet.

Swap Columns in Excel
Enter Data

Step 2: Click on the column header

Click the column header of the column you want to move. To select multiple columns, hold down the Ctrl key while clicking each header. Here we have Selected "Department" Column C, and we want to move it after "Name" Column A.

Note: Hold down Ctrl while clicking on the headers of additional columns that you want to include in your selection.

image
Click on the Column Header

Step 3: Activate the Dragging Feature

Move your cursor to the edge of the selected column, until it turns into a small four-sided arrow cursor.

Step 4: Drag the Column to the New Location

Press and hold the left mouse button while dragging the column. Drag it to the position where you want to place the column.

Step 5: Drop the Column in the Desired Location

When you have the column in the new position, release the mouse button. The column will be dropped into the new location, and all other columns will shift automatically to accommodate it.

image
Column Swapped

Quick Tip:

  • Ensure No Data Overlaps: When dragging columns, be mindful of the data in the columns next to the one you're moving. The columns will automatically shift, so make sure there’s no important data that could get overwritten.
  • Multiple Columns: If you need to move multiple columns at once, click and drag over the headers of the columns you want to move, then drag them to the new position.

Method 3: Move Columns in Excel using Helper Column

If dragging isn’t working for you, another reliable method is using the copy-and-paste function:

Step 1: Select the entire column you want to move

Click the column header of the column you want to move. To select multiple columns, hold down the Ctrl key while clicking each header. Here we have selected "Age" Column to Move.

How to Swap Columns in Excel
Select a Column you want to move

Step 2: Copy the Column

Right-click on the selected column and choose Copy from the context menu. Alternatively, you can press Ctrl + C (For Windows) or Cmd + C (For Mac) to copy the column.

How to Swap Columns in Excel
Copy the Column

Step 3: Choose the Destination Location

Now, click on the column letter where you want to move your selected column. This can be a column to the left or right of the original column, depending on where you want to place it. Here in the below example, we want to paste it to Column F.

Step 4: Paste the Column

Right-click on the selected destination column and choose Insert Copied Cells from the context menu. Excel will insert the copied column at the location of the column you selected.
Alternatively, you can use Ctrl + V (For Windows) or Cmd + V (For Mac), but this will paste it over the existing data, so use the insert method to avoid overwriting other data.

image
Paste your Column

Step 5: Delete the Original Column

After moving the column to the desired location, you might want to delete the original column to prevent duplicates. To do this, right-click on the original column letter and select Delete.

Change the Columns Order in Excel using VBA

If you're familiar with VBA, you can certainly write a macro to automate the process of changing the order of columns in Excel. In theory, this approach sounds efficient, as it could save you time when handling large datasets. However, in practice, you may find yourself spending more time specifying which columns to swap and where exactly to place them, rather than manually dragging them. Additionally, there's no guarantee that the macro will work flawlessly every time, and you'll likely need to verify the result to ensure accuracy. Ultimately, while VBA can offer automation, it might not be the best tool for such a simple task as rearranging columns, especially if the process requires frequent adjustments or verification.

Conclusion

Swapping columns in Excel doesn’t have to be a complicated process. With the methods we've outlined—dragging columns, using a helper column, or leveraging the ‘Cut’ and ‘Insert Cut Cells’ feature—you can easily reorganize your spreadsheet without losing any data. Mastering these techniques will give you greater flexibility in managing your data and help you maintain an organized, efficient spreadsheet. Whether you need a quick swap or a more precise method, these simple steps will make the task a breeze.


Next Article
How to Combine Two Columns in Excel (6 Methods Explained )

T

thevirat3mz
Improve
Article Tags :
  • Excel
  • News
  • Microsoft Office
  • ExcelGuide

Similar Reads

  • How to Combine Two Columns in Excel (6 Methods Explained )
    Combining columns in Excel is a vital skill for organizing and analyzing data effectively. Whether you're merging first and last names, combining data points, or creating seamless datasets, there are several techniques to get the job done. This guide explores six efficient methods, including using t
    7 min read
  • How to Split Cells in Excel: Easy Methods Explained
    How to Separate a Cell in Excel- Quick StepsOpen MS Excel>>Select Data Go to the Data tab>>Click Text to Columns.Choose Delimited and click NextSplitting cells in Excel can simplify data management, especially when dealing with combined information in a single column or cell. Whether you
    10 min read
  • How to Sum a Column in Excel: 3 Methods
    Knowing how to sum a column in Excel is essential for managing budgets, financial reports, and large datasets. Whether you’re calculating sales totals, adding expenses, or analyzing business data, Excel provides multiple ways to add up a column efficiently. Many users wonder "how to add columns in E
    5 min read
  • How to Delete Blank Rows in Excel: 7 Methods Explained
    How to Remove Empty Rows in Excel- Quick StepsSelect the data range.Press Ctrl + G >> Click Special >>Choose Blanks >> Click OK.Right-click on any blank cell >>Click Delete >>Choose Entire Row >> Click OK.Deleting blank rows in Excel is crucial for maintaining cle
    10 min read
  • How to Add a Column in Excel: Step-by-Step Guide
    Need to organize your data better in Excel but unsure how to add a column without disrupting your existing setup? Whether you’re working with a simple list or a complex table, inserting columns is a fundamental skill that increases productivity and keeps your data structured. This guide covers 4 eas
    6 min read
  • How to Group Columns in Excel: Ultimate Guide
    Ever stared at a cluttered Excel sheet and wished you could hide the noise to focus on what matters? Imagine collapsing entire data sections with a single click—no more scrolling through endless columns to find the numbers you need. Excel’s Group Columns feature does exactly that, turning overwhelmi
    5 min read
  • How to Compare Two Columns in Excel : Easy and Quick Methods
    In the world of data analysis, knowing how to compare two columns in Excel is a fundamental skill that can unveil valuable insights and ensure data accuracy. If you're looking to spot differences, find duplicates, or identify similarities, mastering Excel's compare columns functionality is key. This
    8 min read
  • How to Unhide and Show Hidden Columns in Excel: Step by Step Guide
    How to Unhide all Columns in Excel- Quick StepsOpen MS Excel >> Select the Entire WorksheetRight-click on Column Headers >> Select "Unhide"Columns VisibleUnhiding columns in Excel is a simple but essential task when working with hidden data. Whether to make a worksheet look cleaner or ac
    9 min read
  • How to Delete Column in SQL
    In SQL, deleting a column from an existing table is a straightforward process, but it's important to understand the implications and the correct syntax involved. While there is no direct DELETE COLUMN command in SQL, we can achieve this by using the ALTER TABLE command combined with DROP COLUMN. In
    5 min read
  • How to alphabetize in Excel: sort columns and rows
    How to Alphabetize in Excel - Quick StepsOpen MS ExcelSelect Data Go to the Data Tab >> Click on "Sort & Filter"Select "A to Z" In Excel, alphabetizing your data can make finding information much easier. Whether you're organizing names, dates, or any other information, sorting columns and
    9 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences