To move the active cell down one row in Excel, run a VBA macro that selects ActiveCell.Offset(1, 0). In Excel for Microsoft 365 on Windows, the key operation is a one-line offset; the example below also checks for the bottom of the worksheet so it will not try to move past the last row.
What “move down one cell” means
In Excel, “move down one cell” can describe two different actions. Most often, a person means move the active selection from its current cell to the cell directly below it, such as from B4 to B5. That is what the macro in this guide does: it changes which cell is active, but it does not alter any cell values.
Sometimes, however, “move a cell down” means move the cell’s contents and shift other worksheet cells out of the way. That is a data-editing operation, not a navigation operation, and it needs a different command. The distinction matters: a navigation macro should not insert rows, overwrite data, or cut and paste values. If you only want the selection to advance, use the active-cell macro below.
A basic VBA macro for the next row
This macro moves one row down in the same column. For example, if the active cell is D7, it selects D8. It checks whether the active cell is already on the worksheet’s final row before calculating the destination.
Sub MoveActiveCellDownOne()
Dim targetCell As Range
' Stop at the bottom of the worksheet.
If ActiveCell.Row = ActiveSheet.Rows.Count Then
MsgBox "The active cell is already in the last worksheet row."
Exit Sub
End If
' Offset by one row and zero columns, then select the result.
Set targetCell = ActiveCell.Offset(1, 0)
targetCell.Select
End Sub
ActiveCell refers to the current active cell. The Offset method takes a row change first and a column change second, so Offset(1, 0) means one row down and no columns across. Using Offset(0, 1) would instead move one column to the right. The final Select makes the destination cell active.
How to add and run the macro in Windows
Before running any VBA macro, save a copy of the workbook. Macros cannot be undone with Ctrl+Z, and running VBA can clear Excel’s ordinary undo history. This particular macro changes the selection rather than cell data, but keeping a copy is a sensible safeguard whenever you run code.
- Open the workbook in the desktop version of Excel and press Alt+F11 to open the Visual Basic Editor.
- In the editor, choose Insert > Module. A blank code module appears.
- Paste the complete macro into the module, then close or switch away from the editor.
- Save the workbook as an Excel Macro-Enabled Workbook (*.xlsm). A standard .xlsx file cannot store VBA code.
- Return to the worksheet, select a starting cell, and press Alt+F8.
- Select
MoveActiveCellDownOnein the macro list and choose Run.
If the Developer tab is not visible, enable it through File > Options > Customize Ribbon and select Developer in the Main Tabs list. You can also run a macro from Developer > Macros. Excel may display a security warning when opening a macro-enabled file; enable macros only for workbooks you trust and were expecting to use.
Moving repeatedly or assigning a shortcut
Running the macro once moves the selection one row. To move several rows, run it repeatedly, or adapt the row offset to a fixed number. For instance, changing the macro’s offset from 1 to 3 would move three rows down each time. That is different from running a one-row macro three times only in edge handling: a macro with a three-row offset needs its own check to ensure the destination stays within the worksheet.
You can assign a keyboard shortcut through the Macro dialog. Press Alt+F8, select the macro, choose Options, and enter a shortcut key. Excel may use Ctrl plus the letter you choose, or Ctrl+Shift plus that letter if you specify an uppercase letter. Avoid assigning a shortcut you rely on for a built-in Excel command. A shortcut is convenient for repeated navigation, while running the macro from the dialog is safer when you use it only occasionally.
On Mac, the keyboard shortcut for opening the VBA editor and the macro dialog can vary with the keyboard’s function-key settings and Excel release. Use the Macros command on Excel’s Developer tab if the Windows Alt+F8 shortcut does not apply. The VBA code itself generally works in desktop Excel for Mac, but the ribbon and dialog labels can differ. Excel for the web does not run VBA macros; open the workbook in desktop Excel to use this code.
Active cell versus a selected range
A worksheet can have a multi-cell selection, but only one cell within it is the active cell. This macro moves that active cell to the cell beneath it and replaces the previous selection with a single-cell selection. It does not shift an entire highlighted block downward. If you selected B2:B6, for example, the result is the cell directly below whichever cell was active within that selection—not a moved B2:B6 block.
If your goal is to move a whole block of selected cells, decide first whether you want to preserve existing data. Moving a block onto occupied cells can replace data, while inserting cut cells shifts neighboring cells. Use Excel’s normal cut-and-insert commands when you need to rearrange worksheet content, and check the destination before committing the change. A simple navigation macro is not a safe substitute for a data-moving procedure.
Moving cell contents is a different task
To insert a blank cell and push existing cells down, select the destination cell and use Home > Insert > Insert Cells, then choose Shift cells down. To move existing contents, cut the source cell or range and use the appropriate insert-cut-cells command at the destination. If you instead paste directly over a populated destination, the pasted value can replace what was there.
Whole-row changes are different again. Inserting a worksheet row shifts cells across the row structure, while inserting a single cell affects only the selected area and may change the shape of nearby data. Before using an insert command, consider whether formulas, tables, merged cells, or references depend on the current layout. For a one-cell navigation action, pressing the Down Arrow is much simpler than editing the worksheet with insert or cut commands.
Common problems and how to fix them
- The macro is missing from the list: Confirm the code is in a standard module, not only in a worksheet or workbook code window. Check that the workbook is saved as .xlsm and that the macro name is spelled as shown.
- Excel blocks the macro: Use a trusted workbook and review Excel’s security prompt. Do not enable macros in an unexpected file simply to make the code run.
- The active cell does not move: Make sure a worksheet cell is active when you run the macro. A chart sheet or another non-worksheet view is not the intended starting point.
- The macro reports the last row: Excel worksheets have a fixed final row. The guard prevents an invalid move when the active cell is already there; select a cell higher up to continue.
- The sheet is protected: Protection settings can restrict which cells may be selected. Review the worksheet’s protection options or use a permitted cell; do not assume the macro can bypass protection.
For a single move, the Down Arrow key is usually the quickest option. The macro becomes useful when the move is part of a repeated workflow, needs to be assigned to a button or shortcut, or will be called by other VBA code. In Excel, Ctrl+Down does something different: it jumps to the edge of a contiguous data region or to the next relevant boundary, rather than moving exactly one cell.
Frequently Asked Questions
What is the VBA code to move down one cell?
Use ActiveCell.Offset(1, 0).Select inside a macro. The complete example above adds a last-row check so the code does not try to select a cell beyond the worksheet.
Does the macro move the cell’s contents?
No. It moves the active selection only. To move values or insert cells and shift existing data down, use Excel’s cut, paste, or Insert Cells commands instead.
Can I move down one cell without a macro?
Yes. Press the Down Arrow key to move the active cell down one row. A macro is helpful when you want to repeat the action through a shortcut, button, or larger VBA process.
Why does Ctrl+Down move farther than one cell?
Ctrl+Down navigates to a boundary in the current data region; it is not the one-cell movement shortcut. Use the Down Arrow or the Offset(1, 0) macro for a single-row move.
Will this VBA macro work in Excel for the web?
No. Excel for the web does not execute VBA macros. Open the macro-enabled workbook in desktop Excel for Windows or Mac to run it.
Related
- Circular References in Excel: How to Find and Trace Them
- How to Turn On Circular Reference Iteration in Excel
- How to Find a Circular Reference in Excel Step by Step
Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.
More in VBA & macros
- Vba loop through rows?Learn how to loop through Excel rows with VBA, find the last row, handle conditions and deletions, and…
- VBA Range.Count: How to Count Cells, Rows, and ColumnsIn Excel VBA, Range.Count returns the number of cells in a Range object, including blank cells. For example,…
- Excel VBA to List File Names in All Subfolders AutomaticallyTo list file names from a folder and all its subfolders in Excel for Microsoft 365 on Windows,…
- VBA Loop Without Do: Choosing For, While, or For EachYes. In VBA, you can loop without using Do: use For...Next for a known number of repetitions, For…
- Excel VBA Shortcut: Open the Editor and Run MacrosIn Excel for Windows, press Alt+F11 to open the Visual Basic Editor (VBE), where you can view and…
- Excel VBA AutoFilter: Examples, Criteria, and FixesExcel VBA AutoFilter filters a worksheet range or Excel table by applying criteria to one or more columns.…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.