Insert n number of rows based on n number in a cell

Tashat

Board Regular
Joined
Jan 12, 2005
Messages
137
Office Version
  1. 365
Platform
  1. Windows
Hi all

I have two sheets within a workbook. One shown below on A1:I9 is a record of activities. From each activity, there will be a number of actions and on a different sheet I want to "insert" the correct number of rows dependent on the number of actions entered in column I. I also want it to auto-complete some of the information. I.e. as shown in A13:D:27. I would have other columns on the second sheet that the user would manually complete in order to track their actions. Is there a way of doing this? I assume it would require a macro? I'm also wondering what would happen if for example the number of actions was changed in column I at a later date, either increased or reduced. Many thanks in advance.

Book1
ABCDEFGHIJ
1Unique Record NumberDate of ActivityActivityObjective of ActivityOrganisation NameOrganisation TypeResponse to the MeetingDid the Group Offer Supprt?Number of Actions
2ACT00110/01/2021Phone CallABC1PositiveYes3
3ACT00210/01/2021Video CallDEF5NegativeNo1
4ACT00311/01/2021MeetingGHI2NeutralNo0
5ACT00415/01/2021MeetingJKL7NeutralYes5
6ACT00516/01/2021Phone CallMNO3PositiveYes2
7ACT00616/01/2021Phone CallPQR1PositiveYes1
8ACT00719/01/2021Video CallSTU2PositiveYes0
9ACT00819/01/2021Video CallVWX2NegativeNo2
10
11This would be on a different sheet within the same workbook
12
13Unique Record NumberDate of ActivityOrganisation NameOrganisation Type
14ACT00110/01/2021ABC1
15ACT00110/01/2021ABC1
16ACT00110/01/2021ABC1
17ACT00210/01/2021DEF5
18ACT00415/01/2021JKL7
19ACT00415/01/2021JKL7
20ACT00415/01/2021JKL7
21ACT00415/01/2021JKL7
22ACT00415/01/2021JKL7
23ACT00516/01/2021MNO3
24ACT00516/01/2021MNO3
25ACT00616/01/2021PQR1
26ACT00819/01/2021VWX2
27ACT00819/01/2021VWX2
28
Sheet1
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I'm also wondering what would happen if for example the number of actions was changed in column I at a later date, either increased
In that case, using your example from ACT001, if you have 3 and you increase it to 4, then a new record would be created on sheet2.

or reduced
In this case, and following your example from ACT001, if you have 3 and reduce it to 2, then 2 records should be deleted from sheet2, but which 2 records should be deleted, the first 2, the last 2. In this part you must explain what would be the pattern to follow to delete the records.
 
Upvote 0
In that case, using your example from ACT001, if you have 3 and you increase it to 4, then a new record would be created on sheet2.


In this case, and following your example from ACT001, if you have 3 and reduce it to 2, then 2 records should be deleted from sheet2, but which 2 records should be deleted, the first 2, the last 2. In this part you must explain what would be the pattern to follow to delete the records.
Hi DanteAmor - thank you for replying. I think I might need to rethink the whole things, because it's going to be too complicated to manage, because if the number is reduced, there will be information in the concurrent columns which remains. thank you for your help though.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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