Setting a Default for Shifting when Inserting

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


3

When Col inserts cells into a worksheet (not rows, but cells), the process seems to take longer than it should because he always has to check to see if Excel will shift the displaced cells down or to the right. He always wants the cells to be shifted downward, so he is wondering if there is a way to make "shift down" the default.

As Col implied, when you choose some cells and the use the Insert Cells command, Excel displays a dialog box where you can indicate how you want the displaced cells shifted. This process can, indeed, seem to take quite a while if all you ever want to do is shift down when you insert. Unfortunately, there is no way to change the default in Excel.

The solution is to use a macro to do your inserting. It doesn't need to be a long one; for instance, the following will shift cells down when inserting:

Sub ShiftDown()
    Selection.Insert Shift:=xlDown
End Sub

Assign the macro to the Quick Access Toolbar or to a shortcut key, and you can easily shift cells down as you insert. All you need to do is to select the cells (or, indeed, entire rows) and then use the macro. If you want to create variations of the macro that always shift in different directions, all you need to do is change xlDown to xlUp, xlLeft, or xlRight.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (4078) 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

Inserting Footnotes

Footnotes appear at the bottom (or foot) of each page. It is an easy task to insert a footnote at any point you desire, ...

Discover More

Allowing for Words that Contain Numbers

When Excel does a spell-check of the information in a worksheet, you may want it to ignore words that contain numbers. ...

Discover More

Counting Words the Old Fashioned Way

One way to specify word count is to count characters and divide by five. If you still need this old-fashioned way of ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Converting Forced Text to Numbers

If you have some numbers stored in cells that are formatted as text, you may get some surprises when you try to use those ...

Discover More

Adjusting a Range's Starting Point

Select a range of cells, and one of those cells will always be the starting point for the range. This tip explains how to ...

Discover More

Previous Column Values in a Drop-Down List

Want a quick way to add non-unique values into a column? You probably know you can do this by starting to simply type in ...

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 6 - 0?

2022-06-01 00:43:58

Peter

Insert Copied Cells has the same problem.
Of interest, is that once the cells are copied and the target selected, you can use the suggested macro and the cells are pasted without an explicit step.

John Fong, I also lament the passing of the predictive capability because I nearly always want to insert cells & shift down


2022-05-31 15:05:27

J. Woolley

The description of this Tip's macro is not quite correct. The Range object's Insert method has a Shift parameter as indicated, but the only acceptable values for Shift are xlShiftDown (-4121, same as xlDown) or xlShiftToRight (-4161, same as xlToRight). The Tip suggests using xlUp, xlLeft, or xlRight, but each will result in an error.


2022-05-30 14:11:22

John Fong

Thank you for this helpful tip.

The older versions of Excel had a smart feature that predicted whether I wanted to shift cells down or right. For example, if I selected a range 4 columns wide and 1 row deep, it predicted I wanted to shift cells down and have that option preselected. If my selection was 4 rows deep and 1 column wide, it would preselect shift cells right. It seems Excel 365 has gotten dumber because it preselects shift cells right all the time? And there is no way to change that?


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.