MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Rearranging Rows in Excel by Sliding in Word

September 27, 2004 - by Bill Jelen

Jon Von Gunten sent in this week's tip. Excel is excellent at sorting data. Sometimes, though, you need to do a manual sort. Consider this database.

Let's say that you want to sort this data by neighborhood. Any businesses on Maple, Edison, or Prospect streets (or the side streets within a block of those streets) should be grouped together. It would be possible to write a complex IF statement that would attempt to group them. However, for a small list, sometimes it is just easier to shift the rows around.

You might try the method of selecting the cells in a row, using Edit - Cut, then Insert - Cut Cells to oh-so-slowly resequence the data. Jon has found a better way.

Microsoft Word has a feature which Excel is lacking. Jon's method involves moving the data to Word, employing the Word command and then pasting the data back to Excel. Follow these steps.

  1. Copy the relevant chunk of rows and columns out of your speadsheet. It is best to note the size of the range, e.g., 118 rows x 5 columns
  2. Paste the data into a Microsoft Word document, where it automatically becomes a table and retains all your formatting.
  3. In Word, use the little-known Shift Alt  Up Arrow and Shift Alt Down Arrow to very speedily slide rows (or selected chunks of rows) up and down at will. Select one or more rows. You can select the entire row or just a portion of the row as shown here.

    Hit Shift Alt  Up Arrow several times in order to quickly slide the rows up into position.

  4. When you have sequenced the rows as you like, paste them back into Excel, making sure you overwrite the exact same size chunk you copied.

Thanks to Jon Von Gunten for this idea about making use of Word to solve this problem.

Bill Jelen is the author / co-author of:

Excel Dynamic Arrays Straight to the Point 2nd Edition

Fifteen months after Dynamic Arrays debuted for Office Insiders, the functions are being released to General Availability. This second edition of the book has been updated with new examples: see how Dynamic Arrays make XLOOKUP better. The chapter on the logic behind arrays has been expanded.