VBA learner ITG
Active Member
- Joined
- Apr 18, 2017
- Messages
- 272
- Office Version
- 365
- Platform
- Windows
- MacOS
Hi all,
I have an VBA/Formula logic issue which I hope to pick your brains on.
Step 1 - user completes a data table from column C row 2 onward which tells a macro how many times to duplicate the row by per column B row 2.
I have a formula which then populates column A row 2 with the column header:
=IF(COUNTA($B2:$D2)=0,"",INDEX($B$1:$G$1,MATCH(FALSE,INDEX(ISBLANK($B2:$G2),0),0)))
However the above formula will only populate the first column Name which is great if we are not duplicating the rows.
However, the issue is that I need to populate the column header of the row that has been duplicated so it looks at the column after the first one of that row.
Step 2 - this is what the finished data table should look like.
Any advice would be appreciated.
I have an VBA/Formula logic issue which I hope to pick your brains on.
Step 1 - user completes a data table from column C row 2 onward which tells a macro how many times to duplicate the row by per column B row 2.
I have a formula which then populates column A row 2 with the column header:
=IF(COUNTA($B2:$D2)=0,"",INDEX($B$1:$G$1,MATCH(FALSE,INDEX(ISBLANK($B2:$G2),0),0)))
However the above formula will only populate the first column Name which is great if we are not duplicating the rows.
However, the issue is that I need to populate the column header of the row that has been duplicated so it looks at the column after the first one of that row.
Step 2 - this is what the finished data table should look like.
Any advice would be appreciated.
