Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Move Rows in Excel Step by Step

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Moving rows in Excel lets you rearrange data quickly without retyping or copying-pasting manually. This is essential for organizing lists, correcting errors, or preparing reports. No special tools are required—just Excel itself and a basic understanding of selecting and cutting data.

What You'll Need

  • Microsoft Excel (any modern version: 2016, 2019, 2021, Microsoft 365, or Excel for the web)
  • A worksheet with data organized in rows
  • Access to your keyboard and mouse (or trackpad)

Step-by-Step

  1. Open your Excel file and navigate to the worksheet containing the rows you want to move.
  2. Click the row number on the left-hand side of the worksheet to select the entire row. For example, click the number "5" to select row 5. You’ll see the entire row highlight in blue.
  3. Hold down the Shift key on your keyboard. While holding Shift, hover your mouse cursor over the border of the selected row until it changes from a standard arrow to a four-way arrow with a small vertical line beside it.
  4. Click and hold the left mouse button. Drag the row up or down to its new location. As you drag, you’ll see a thick horizontal line appear between row numbers, showing exactly where the row will be inserted.
  5. Release the mouse button when the horizontal line is positioned between the two rows where you want the row to land. The row will move instantly, and all other rows will shift to accommodate it.
  6. If you need to move multiple rows, select them first: click the first row number, hold Shift, then click the last row number in the range. For example, to select rows 3 through 7, click "3", hold Shift, then click "7". Then repeat steps 3–5.
  7. After moving, verify the data is in the correct order by scanning the row numbers and checking key values. If you moved the wrong row, press Ctrl+Z immediately to undo.

Common Mistakes

  • Not holding the Shift key when dragging. If you drag without holding Shift, Excel will copy the row instead of moving it. This can create duplicate data and confusion.
  • Clicking the cell content instead of the row number. Selecting a cell within the row and dragging may only move that cell’s content, not the entire row.
  • Dragging too quickly or inaccurately. If the horizontal insertion line doesn’t appear, you’re not hovering over the correct border. Slow down and ensure the cursor changes shape before dragging.
  • Moving rows with formulas that reference other rows. If a formula in row 10 references cell A5, and you move row 5 to row 15, the formula may break or reference the wrong data. Always check formulas after moving rows.
  • Trying to move rows in a protected sheet without unprotecting it first. If the worksheet is protected, Excel will prevent dragging. Go to Review > Unprotect Sheet to enable row movement.

Tips

  • Use keyboard shortcuts as an alternative: select the row, press Ctrl+X to cut, select the row where you want to insert, right-click and choose Insert Cut Cells. This method works even if dragging is disabled.
  • Always make a backup copy of your file before moving large sets of rows, especially if the data is part of a critical report or linked to other sheets.
  • Use column filters to sort data instead of manually moving rows when possible. Sorting is faster and less error-prone for large datasets.
  • If you frequently rearrange rows, consider using Excel Tables (Insert > Table). Tables auto-adjust formulas and references when rows are inserted or deleted.
  • When moving rows that contain merged cells, be aware that merging may break or misalign after the move. Unmerge cells first if you encounter formatting issues.
  • On touch devices or tablets, long-press the row number, then drag. Some tablets may require a stylus for precision.

Troubleshooting

  • The row doesn’t move when I drag it. Make sure you’re holding the Shift key. If it still doesn’t work, check if the worksheet is protected (Review tab > Unprotect Sheet). Also ensure you’re clicking the row number, not a cell.
  • Excel copies instead of moves. You didn’t hold Shift. Release the mouse, undo with Ctrl+Z, then try again with Shift held down.
  • The insertion line doesn’t appear. Your cursor isn’t positioned correctly. Move it slowly over the top or bottom edge of the selected row until the cursor changes to the four-way arrow with a vertical line.
  • Formulas are broken after moving. Check for relative references like A1 or B5. If a formula in row 10 references A5, and you moved row 5 to row 15, the formula now points to A15. Fix it by changing references to absolute (e.g., $A$5) or manually correcting the formula.
  • Rows disappear or data is lost. This rarely happens unless you accidentally overwrote data. Press Ctrl+Z immediately. If that doesn’t work, restore from a previous version (File > Info > Version History).
  • Dragging is disabled in Excel for the web. Row dragging is not supported in Excel for the web. Use the cut-and-insert method: select row > Ctrl+X > select destination row > right-click > Insert Cut Cells.

Frequently Asked Questions

Can I move rows between different worksheets?

No, you cannot drag rows directly between worksheets. Copy the row (Ctrl+C), switch to the target worksheet, select the row where you want to insert, right-click, and choose Insert Copied Cells.

Why does my row shift when I move another row?

When you move a row, Excel shifts all rows above or below it to make space. This is normal behavior. If you want to swap two rows without shifting others, copy one row, paste it over the other, then delete the original.

Can I move rows using only the keyboard?

Yes. Select the row with Shift+Space, press Ctrl+X to cut, select the destination row number, press Ctrl+Shift++ (plus sign) to insert cut cells.

What if I accidentally delete a row while trying to move it?

Press Ctrl+Z immediately to undo. If you’ve done other actions since, use File > Info > Version History to restore a prior version of the file.

Does moving rows affect pivot tables?

Yes, if the pivot table’s data source includes the moved rows, it may update automatically. If it doesn’t, right-click the pivot table and select Refresh. Always check pivot table results after rearranging source data.

Is there a limit to how many rows I can move at once?

No, Excel allows you to select and move up to the maximum number of rows in a worksheet (1,048,576). Performance may slow with very large selections, but the feature will still work.