The VBA code to move down one cell is ActiveCell.Offset(1, 0).Select. The Offset method takes a row count and a column count, so (1, 0) means one row down and zero columns across. If you only ever want to step down from the active cell, ActiveCell.Offset(1, 0).Activate does the same job, and you can also use Selection.Offset(1, 0).Select when a whole range is selected rather than a single cell. Everything below explains where to paste that line, how to make it repeat, and the traps that make it fail.

What You'll Need

  • A desktop copy of Excel for Windows or Mac with macros enabled. The VBA editor is not available in Excel for the web.
  • A workbook saved as .xlsm (macro-enabled) if you want the code to survive closing and reopening the file.
  • Access to the Developer tab, or the ability to turn it on via File > Options > Customize Ribbon (on Mac: Excel > Preferences > Ribbon & Toolbar).
  • Macro security set to allow macros, at least for trusted documents. You will find this under File > Options > Trust Center > Trust Center Settings > Macro Settings.

Step-by-Step

  1. Open the VBA editor. Press Alt + F11 on Windows. On a Mac, press Option + F11 or choose Developer > Visual Basic. Menu labels can differ slightly between Excel versions and platforms.
  2. Insert a module. In the editor, use Insert > Module. A blank code window appears on the right. Code placed in a module is available to the whole workbook; code placed in a sheet module only runs for that sheet.
  3. Write the procedure. Type the following, replacing the name with something meaningful to you:
    Sub MoveDownOneCell()
        ActiveCell.Offset(1, 0).Select
    End Sub
    The Sub line starts the routine, the middle line does the work, and End Sub closes it.
  4. Understand what each part does. ActiveCell is the single cell currently highlighted. Offset(1, 0) returns a reference one row below it in the same column. Select makes that cell the new active cell, which is exactly what clicking one row lower would do.
  5. Run it. Click anywhere inside the procedure and press F5, or use Run > Run Sub/UserForm. Switch back to Excel with Alt + F11 and you will see the selection has moved down by one row.
  6. Attach it to a button (optional). On the sheet, go to Developer > Insert > Button (Form Control), draw the button, and assign MoveDownOneCell in the dialog. Clicking the button now moves the selection down one cell each time.
  7. Attach it to a keyboard shortcut (optional). In the VBA editor, add Application.OnKey "^d", "MoveDownOneCell" inside a Workbook_Open procedure in the ThisWorkbook module. That maps Ctrl+D to your macro while the workbook is open. Note that this overrides Excel's built-in shortcut for the session, so pick a combination you do not rely on.
  8. Save the file. Use File > Save As and choose the macro-enabled workbook format. A plain .xlsx file will strip the code on save.

Common Mistakes

  • Using Offset(0, 1) by accident. That moves one column right, not one row down. The row argument always comes first.
  • Running the macro on an empty selection. If no cell is active — rare, but it happens after certain operations — the macro raises a runtime error. Click a cell first.
  • Stepping past the last row. Offset(1, 0) from row 1,048,576 throws error 1004 because there is nothing below. Guard against it with a check such as If ActiveCell.Row < Rows.Count Then.
  • Putting the code in the wrong place. A procedure in a sheet module is not listed in the macro dialog the same way as one in a standard module. If your macro does not appear, check where you pasted it.
  • Saving as .xlsx. The code vanishes without a clear warning beyond a prompt at save time.
  • Assuming Select and Activate are identical. For a single cell they behave the same, but for a multi-cell range Select highlights the whole range while Activate makes one cell within it current.

Tips

  • To move down a fixed number of rows, change the first argument: Offset(5, 0) jumps five rows.
  • To move up, use a negative number: Offset(-1, 0). This fails on row 1 for the same reason as above.
  • If you want to move down and write a value at the same time, skip the selection entirely: ActiveCell.Offset(1, 0).Value = "Done". Working directly with the cell is faster than selecting it, and it avoids flicker on large loops.
  • Wrap repeated movement in a loop with a counter so you can stop at a blank row: Do While ActiveCell.Value <> "" followed by the offset line and Loop.
  • Use Application.ScreenUpdating = False at the start and set it back to True at the end when a macro moves the selection many times. It makes the run noticeably smoother.
  • Rename the procedure to describe the intent rather than the mechanic, for example NextRecord, so the macro list stays readable.

Troubleshooting

The macro does nothing. Check that macros are enabled for the file and that you are looking at the right sheet. If the code sits in a sheet module, it will not appear in the Developer > Macros list unless you scope it correctly.

Error 1004 "Application-defined or object-defined error". Almost always the last-row problem. Confirm the active cell is not on the final row, and add the row check described above.

Error 91 "Object variable or With block variable not set". This appears when there is no active cell, which can happen if the macro runs while a chart sheet or a dialog is in focus. Activate a worksheet first.

The selection jumps more than one row. The procedure is probably being triggered more than once — a button assigned twice, or an OnKey mapping combined with a button press. Remove the duplicate assignment.

Nothing happens when you press the shortcut. The OnKey mapping only exists while the workbook that set it is open, and another open workbook may have claimed the same combination. Close other macro workbooks and try again.

The code disappeared after saving. The file was saved in a non-macro format. Save As and pick the macro-enabled type, then re-add the code if it was lost.

Frequently Asked Questions

What is the shortest VBA code to move down one cell?

ActiveCell.Offset(1, 0).Select. One line, no variables, works in any standard module.

How do I move down one cell and keep the original cell selected too?

You cannot keep two separate active cells. If you need to work with both, store the original in a range variable first: Set startCell = ActiveCell, then offset from there.

Does this work in Excel for the web?

No. The VBA editor and macro execution are desktop-only features. The web version can open a macro-enabled workbook but will not run the code.

Can I make it move down every time I press Enter?

Excel already moves the selection down on Enter by default; that behaviour is controlled in File > Options > Advanced, not by VBA. Use the macro only when you need the movement triggered by a button or a custom shortcut.

Why does Offset fail on the last row?

Because there is no cell below the final row of the sheet. Test ActiveCell.Row against Rows.Count before offsetting.

Can I move down one cell in a specific column instead?

Yes. Use Cells(ActiveCell.Row + 1, 3).Select to land on the next row of column C regardless of where the cursor started.