Automatically Insert a New Row

Q45

New Member
Joined
Feb 17, 2002
Messages
32
How can I automatically insert a row directly underneath a cell that I type something in?
There are a couple hundred rows in the sheet but I need to add a new row directly underneath a cell that I just typed in, in the middle of the sheet.
Any suggestions?
This message was edited by Q45 on 2002-02-21 19:46
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Q, maybe an event procedure like the following will work:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
activecell.offset(1,0).select
Selection.EntireRow.insert
End Sub

Put it in a sheet module, right click on sheet, select view code and paste it in there.

HTH, Nate
This message was edited by NateO on 2002-02-21 19:58
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,216
Members
448,876
Latest member
Solitario

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top