Moving More than One Cell to the Right

Written by Allen Wyatt (last updated May 6, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


3

Tawna can configure Excel to move in any of four directions when she presses Enter. She wonders if it is possible to make Excel move a specific number of cells to the right upon pressing Enter.

As Tawna notes, Excel allows you to configure the program so that when you press Enter, you'll move in any of four directions.

  1. Display the Excel Options dialog box. (In Excel 2007 click the Office button and then click Excel Options. In Excel 2010 or a later version display the File tab of the ribbon and then click Options.)
  2. At the left of the dialog box click Advanced. (See Figure 1.)
  3. Figure 1. The Advanced options of the Excel Options dialog box.

  4. Under Editing Options, make sure that the checkbox for "After pressing Enter, move selection" is checked (it should be by default).
  5. Using the Direction drop-down list, change the direction as desired. Changing the direction affects how Excel behaves in all workbooks.

Note that the configuration is for direction only; you cannot specify how many cells you want to move in any particular direction—which is what Tawna wants to do.

There are several ways that you can accomplish the task at hand. Let's say that you want, when pressing Enter, to move 4 cells to the right. One way is configure Excel to move to the right (using the steps above) and then hide columns you want to skip over. So, for instance, let's say that after entering something in column C you want to skip over column D:F and make your next entry in column G. All you would need to do is to hide columns D:F, then when you press Enter, you'll end up in column G.

This approach is great if you always know where you will start and you always want to skip a set number of columns. It is not so great if you aren't entering information in such a structured manner. Instead, you may want to utilize a cell (and worksheet) protection approach. Follow these steps:

  1. Select all of the cells in which you'll want to enter information. (Select the first cell, and then hold down the Ctrl key as you click on each of the others.)
  2. Press Ctrl+1 (that's the number 1). Excel displays the Format Cells dialog box.
  3. Make sure the Protection tab is displayed. (See Figure 2.)
  4. Figure 2. The Protection tab of the Format Cells dialog box.

  5. Clear the Locked checkbox.
  6. Click on OK to close the dialog box.
  7. Make sure the Home tab of the ribbon is displayed.
  8. Click Format in the Cells group, and then choose Protect Sheet. Excel displays the Protect Sheet dialog box. (See Figure 3.)
  9. Figure 3. The Protect Sheet dialog box.

  10. Clear all of the check boxes except for Select Unlocked Cells (it should be the only one selected).
  11. You do not need to enter a password. Just click on OK.

Now when you press Enter in the worksheet, you are moved to the next unlocked cell, in the direction you specified in the earlier steps described in this tip. It is only the cells that you unlocked that are selected, in turn.

Finally, you could use a macro to handle the movement for you. Here are two that implement a simple approach:

Sub MoveXRight()
    'Enter number > 1 in designated cell
    'Moves that number of cells to the right
    Dim n As Integer

    n = Sheets("Sheet1").Range("A1")
    ActiveCell(0, n + 1).Select
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    If Sheets("Sheet1").Range("A1") > 1 Then
        MoveXRight
    End If
End Sub

Note that the second macro should be placed in the ThisWorkbook module, as it is an event handler. Each time that it is triggered, the other macro (MoveXRight) is executed. It pulls a value from cell A1 on Sheet1 and then moves that number of cells to the right. To use the macro, simply enter a value in cell A1 of Sheet1 that indicates how many cells you want to move. To have Enter work like normal, just place a 0 or 1 into cell A1.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10554) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Thoughts and Ideas on Significant Digits in Excel

Ruminations and reflections about significant digits in Excel. Includes examples of how significant digits can affect the ...

Discover More

Showing Print Preview for the Current Page

The Print Preview feature in Excel can be quite helpful. You might think it would be more helpful, though, if it ...

Discover More

Adjusting Navigation Pane Font Size

The Navigation pane can be quite handy for quickly jumping to different areas of your document. If the size of the text ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Changing Months in a Workbook

When you copy a worksheet and then need to make changes to information in that worksheet (such as changing month names), ...

Discover More

Creating Selections

Want a really easy way to create a selection of a group of cells? Discover how to use the Extend key to make this task ...

Discover More

Controlling Formula Reference Jumping

When you select a cell, you typically do so to see what the cell contains to to make changes to the cell. How Excel ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is nine minus 5?

2023-05-08 09:04:40

Tomek

If you select cells to enter your information in, you do not need to use the protection trick described above. Instead use ENTER or TAB keys to move the cursor within the selection. The selection does not need to be contiguous.
You can create a named range with that selection, to be able to select it repeatedly. When creating the named range, make sure that the cell you want to start in is the active cell.
Just do not use arrow keys to move the cursor - it will reset the selection to just one cell. This applies also to using TAB and ENTER as described in my previous comment - it will break the row as Excel remembers it..


2023-05-08 08:47:47

Tomek

By default ENTER moves cursor one cell down and TAB - one cell to the right.
Did you know that when you use the TAB key when entering data into a table row, when you reach the end of the row and press ENTER, the cursor will move to the first cell of the next row, rather than just to the cell below the current one.


2023-05-07 18:46:38

Vince Lord

By time you operate these macros or hide cells, you could just punch enter 4 times. Creative solutions but seem like overkill.

Love your newsletter and the new Macros book and the other related offer are great. Thanks for publishing this great information.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.