VBA Code or other to create new record on previous record input (no longer blank)

johanbamberger

New Member
Joined
Apr 18, 2023
Messages
2
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
Platform
  1. Windows
I have a Input Form / Table for Data Entry which is presented to a client for completion. As the Table could be 5 to 100 entries long I can not compensate for the unknown about of required rows.

Each Table thus has a number of records provided, but needs to “grow” based on the data entry, to allow for all relevant data to be added to the Form / Table.

I need assistance on a mechanism (VBA Code or other) to achieve the following :

When the last row / record in the Table is not blank, then add a new row to the bottom of the table. The record is however not just a row, but actually a blank line and the data entry row (so two rows).

The details :

Table : A1:Q10

Headers : Row 2

Input Example : Row 4

First Record : Row 6

Last Record Row 8

*Between each Record / Row there is a blank row to adhere to the visual aesthetics of the form.

*Row 3 and 4 is the “temple” from which to copy.



The requirement :

If Row 8 is not blank, then add a copy of row 3 and 4 at the bottom of the table, as the next “new record” ready to be populated.

Picture1.png


If Row 8, Column E has input (is not blank), the trigger the add of the new record.

Picture2.png


If Row 10, Column E has input (is not blank), the trigger the add of the new record.


Picture3.png


Any advise would be much appreciated.

J
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,223,888
Messages
6,175,203
Members
452,617
Latest member
Narendra Babu D

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