Auto crate rows based on a cell with input value

Bee67

New Member
Joined
Feb 6, 2023
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Hi
Trying to get my spreadsheet to create a number of rows with some prepopulated values in certain columns based on an input value of number of rows to create.
Example:
Cell B2 contains an input value between 1-9999.
When a value is entered the equivalent number of rows should be added, starting at row 4. Some of the column values in the row should be prepopulated with values.
It also needs to be dynamic so, if the value in B2 is changed, the number of rows pre populated is also changed.
Can anyone help?
TIA
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Where are the "Prepopulated Values" that you want added to the new rows? How do you want the rows labeled?
So, if B2 has a value of 10.. you want to rows created.. some of them populated with data from somewhere else... what/where is that data?
Does the data have any rules that need to be followed regarding how it is put into the new column of rows?

Please use the xl2bb add in and post an example of what you'd like? and also some sample of the other column of data that is supposed to be mapped onto the new column.
 
Upvote 0
Hi awoohaw

Thanks for replying.

Yes you’re right. If b2 has a value of 10 then in need 10 lines generated.

The rows would be labelled using a ref number starting at 0001 and with a max of 9999.

The data can be held on a separate sheet in the workbook and is very simple. No rules - always the same value in each column. So for each row column A would have an incrementing ref no. and each column the same value so col B w oh ld always default to ‘red’, col E default to ‘open’.

I am trying to load the add in but it isn’t working right now. As soon as I get it to work I’ll add an example sheet.

Thanks.
 
Upvote 0
Okay, in the meantime, I'll try to create a small working file. Hopefully, I'll match your words to a spreadsheet.
 
Upvote 0
Okay, here is what I think you asked for: Instead of adding sheets, i put the RED and OPEN values off to the side.

Mr Excel Questions2.xlsm
ABCDEFGHIJ
1ROWS to CREATE:10(1-9999)
2
3ABE
40001REDOPEN
50002REDOPEN
60003REDOPENOther Sheet:B Column:RED
70004REDOPENOther Sheet: E Column:OPEN
80005REDOPEN
90006REDOPEN
100007REDOPEN
110008REDOPEN
120009REDOPEN
130010REDOPEN
14
Sheet22
Cell Formulas
RangeFormula
A4:A13A4=TEXT(SEQUENCE(B1,1,1,1),"0000")
B4:B13B4=INDEX($J$6,(ROW(A4#)^0),0)
E4:E13E4=INDEX($J$7,(ROW(A4#)^0),0)
Dynamic array formulas.
 
Upvote 0
Solution
This is great and does what I need.
Thank you very much!
 
Upvote 0

Forum statistics

Threads
1,214,396
Messages
6,119,268
Members
448,881
Latest member
Faxgirl

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