Help needed with Excel Macro

[Closed]
Report
Posts
1
Registration date
Thursday January 3, 2013
Status
Member
Last seen
January 3, 2013
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,


I have the following sheet:
A B C D
1 XXX Monday 5-Jan 5
2 YYY Tuesday 18-Feb 0
3 ZZZ Wednesday 23-Mar 3
4 AAA Thursday 12-Dec 4

I would like to insert after row #1 empty rows (the number is to be taken from Cell D1).
After inserting the empty rows, to copy A1:C1 to the empty rows and move to the next row, until the last cell in column D is Null.

Can you help me?

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
move to next row ?. After row #1 you just added new rows. so what is meant by next row here
Thank you for your willingness to help.
I meant after row #1 I need to add 5 rows (based on the value in D1) and copy A1:C1 to A2:A6. then go to next row where there's full data (row 7) and read the value in column D (D7=0). Since it is 0 --> skip to next row. Read D8 and insert rows as this value suggests (in this case 3) --> insert 3 rows, and copy A8:C8 to A9:A11. ad so on... the list is long... the above is just and example.
thanks again.
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768