Automate insertion of row data

MrJJP

New Member
Joined
Sep 9, 2024
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello, would like to automatically add certain row data when data in other cells is added. In the below screenshot I have unchanging data in columns B & C, with the expectation that users will input data into the respective columns D, E & F. So my starting point in the example is B2:F5, and I would like it to come out to looking like the example in B8:F13. Another way to say this, is in B8:F13, if a user input the data into D8, E8, and/or F8, upon hitting enter, it would create a new row underneath it with blanks (ready for the next user's input) into D9:F9, but still copy/retain the original data values from B8 and C8. I'd prefer to do it without VBA, but can muster through that with any additional help (my total number of rows will be around 35 and I may have 3-4 additional columns). Thanks for any help!

1725913926851.png
 
I hope I've understood correctly. If so I think this fixes the issue.

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim cRow As Long
    If Intersect(Target, Range("F3:F40")) Is Nothing Or Target.Columns.Count > 1 Then Exit Sub
    Application.EnableEvents = False
    cRow = Target.Row
    Rows(cRow + 1 & ":" & cRow + 1).Insert Shift:=xlDown
    Range("B" & cRow & ":D" & cRow).Copy Range("B" & cRow + 1 & ":D" & cRow + 1)
    Application.CutCopyMode = False
    Application.EnableEvents = True
End Sub
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,221,831
Messages
6,162,242
Members
451,756
Latest member
tommyw

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