Excelconfused1
New Member
- Joined
- Feb 27, 2019
- Messages
- 3
I am only just starting to learn how to do VBA Excel macrosand I would like to create a macro to do the following:
If I have rows of data as follows (simplified), in a sheet called "Dependencies":
Column: A B C D E F G
Headings: Service Dep1 Cat1 Dep2 Cat2 Dep3 Cat3.
Row 1 A B U C U E D
Row 2 B A U G D H D
I would like to copy the data to new rows in a new sheet inthe workbook (sheet name "Expanded" as follows:
Service Dep Cat
A B U
A C U
A E D
B A U
B G D
B H D
In other words, separate out the Cat / Dep occurrences ineach row from "Dependencies" so each Cat/ Dep occurrence appears in its own row in the "Expanded" sheet.
I have 50 occurrences for each row. I only want to createentries in the new sheet where they are not blank in the original sheet.
There are about 200 rows I need to convert in this way.
How would I code this?
Thanks in advance.
If I have rows of data as follows (simplified), in a sheet called "Dependencies":
Column: A B C D E F G
Headings: Service Dep1 Cat1 Dep2 Cat2 Dep3 Cat3.
Row 1 A B U C U E D
Row 2 B A U G D H D
I would like to copy the data to new rows in a new sheet inthe workbook (sheet name "Expanded" as follows:
Service Dep Cat
A B U
A C U
A E D
B A U
B G D
B H D
In other words, separate out the Cat / Dep occurrences ineach row from "Dependencies" so each Cat/ Dep occurrence appears in its own row in the "Expanded" sheet.
I have 50 occurrences for each row. I only want to createentries in the new sheet where they are not blank in the original sheet.
There are about 200 rows I need to convert in this way.
How would I code this?
Thanks in advance.