Billman101
New Member
- Joined
- Feb 14, 2019
- Messages
- 9
Hello,
First time post/reply. I'm a pro at recording macros :wink: but not so much on writing them. I'm trying to insert Row(s) based on cell value(s) that reside within my sheet.
Cell A3 has a value of N = 3 and I'd like to insert N rows at row 5 (two rows lower than 3). Then
at Cell A6 which has a value of N = 26 I'd like to insert N rows at row 8 (again two rows lower) and so on as depicted below:
[TABLE="class: cms_table, width: 229"]
<tbody>[TR]
[TD="align: right"]3[/TD]
[TD]Sunday[/TD]
[TD]2/17/2019[/TD]
[/TR]
[TR]
[TD="align: right"]26[/TD]
[TD]Monday[/TD]
[TD]2/18/2019[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD]Tuesday[/TD]
[TD]2/19/2019[/TD]
[/TR]
[TR]
[TD="align: right"]17[/TD]
[TD]Wednesday[/TD]
[TD]2/20/2019[/TD]
[/TR]
[TR]
[TD="align: right"]19[/TD]
[TD]Thursday[/TD]
[TD]2/21/2019[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD]Friday[/TD]
[TD]2/22/2019[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]Saturday[/TD]
[TD]2/23/2019[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks for any insight you have,
Bill
First time post/reply. I'm a pro at recording macros :wink: but not so much on writing them. I'm trying to insert Row(s) based on cell value(s) that reside within my sheet.
Cell A3 has a value of N = 3 and I'd like to insert N rows at row 5 (two rows lower than 3). Then
at Cell A6 which has a value of N = 26 I'd like to insert N rows at row 8 (again two rows lower) and so on as depicted below:
[TABLE="class: cms_table, width: 229"]
<tbody>[TR]
[TD="align: right"]3[/TD]
[TD]Sunday[/TD]
[TD]2/17/2019[/TD]
[/TR]
[TR]
[TD="align: right"]26[/TD]
[TD]Monday[/TD]
[TD]2/18/2019[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD]Tuesday[/TD]
[TD]2/19/2019[/TD]
[/TR]
[TR]
[TD="align: right"]17[/TD]
[TD]Wednesday[/TD]
[TD]2/20/2019[/TD]
[/TR]
[TR]
[TD="align: right"]19[/TD]
[TD]Thursday[/TD]
[TD]2/21/2019[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD]Friday[/TD]
[TD]2/22/2019[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]Saturday[/TD]
[TD]2/23/2019[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks for any insight you have,
Bill