1

Tried to create a macro in Excel to insert a row:

Sub InsertRow() ' ' InsertRow Macro ' ' Keyboard Shortcut: Ctrl+Shift+I ' Selection.EntireRow.Insert End Sub 

However, this does not insert a new row without first manually selecting a row.

Every solution I've found requires that a row be highlighted before inserting a new row.

See also: http://www.shortcutworld.com/en/win/Excel_2010.html

How would you create a shortcut key (e.g., Ctrl+Shift+J) to highlight the current row and insert a new row?

Thank you!

Update

Looks like Shift+Space highlights the current row.

2 Answers 2

2

Solution...

  1. Create a macro:

    Sub InsertRow() ' ' InsertRow Macro ' ' Keyboard Shortcut: Ctrl+Shift+J ' ActiveCell.EntireRow.Select Selection.EntireRow.Insert End Sub 
  2. Assign the macro to a keyboard shortcut.

0
1

How about putting the insert row command in the quick access toolbar and calling it with AltNumber?

You could also use AltIR for your first insert and then F4 to repeat the insert, i.e. insert a new row above your selection (no need to select the whole row first). You can move your selection around and still use it.

7
  • The Alt-I R is slower than Ctrl+Shift+J because there is a key release that must happen first. The Alt-Number might work; I have a funny feeling it would prompt for the number of rows to enter, though. Commented Oct 31, 2012 at 22:43
  • Shift+Space / Ctrl+Shift+= Commented Oct 31, 2012 at 22:49
  • Yes, those work, but I'm looking for a single shortcut, not two shortcuts in combination. Commented Oct 31, 2012 at 22:52
  • For example, hold down Ctrl+Shift and type J as often as needed; it's very fast. Commented Oct 31, 2012 at 23:11
  • 1
    If you want to do it often, just use F4\ Commented Oct 31, 2012 at 23:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.