Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Swap 2 rows in Excel

Posted on 2011-04-27
5
Medium Priority
?
314 Views
Last Modified: 2012-06-21
Please tell me how I can swap 2 rows in Excel.

Thanks!
0
Comment
Question by:dshrenik
  • 3
  • 2
5 Comments
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35480628
Select one of the rows, press CTRL+X, select the other row, choose the menu command Insert->Copied Cells. Repeat for the other row.

Kevin
0
 

Author Comment

by:dshrenik
ID: 35480631
Well, is there a straight forward way to do that? I have to swap several rows.
0
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 2000 total points
ID: 35480638
You can sort them in a custom order. Identify an unused column and enter integer values for each row: 1 for the row you want first, 2 for the second, and so on. Then sort the table using the custom order column as the key. Delete the column when done.

Kevin
0
 

Author Comment

by:dshrenik
ID: 35483124
That's a nice idea!
But, does Excel have a built-in function that swaps 2 rows or columns?
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35483712
No, it does not. The only way to do it is to cut and insert.

Kevin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

576 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question