Hello helpful excel folk!
I have been given a data export to cross reference that looks like it was created as some kind of pivot and the only data structures are the cell indents in the first column.
I have already used a small VBA script to populate the indent level of the cell data and now I am struggling to transpose that data based on each group of cells between indent level 0's while iterating through the other indent levels in the group. If there was a standard number of rows or indent levels it would probably be easy but this has variable numbers of locations and pages under each company.
Here is an example of the data i have with the indent level and what i am trying to have the resulting data look like:
<tbody>
</tbody>
<tbody>
</tbody>
Any insight you can give me to solve this would be greatly appreciated.
-Meta1
I have been given a data export to cross reference that looks like it was created as some kind of pivot and the only data structures are the cell indents in the first column.
I have already used a small VBA script to populate the indent level of the cell data and now I am struggling to transpose that data based on each group of cells between indent level 0's while iterating through the other indent levels in the group. If there was a standard number of rows or indent levels it would probably be easy but this has variable numbers of locations and pages under each company.
Here is an example of the data i have with the indent level and what i am trying to have the resulting data look like:
Data | Time | IndentLevel |
Company 1 | 9 | 0 |
Location 1 | 9 | 1 |
Page 1 | 2 | 2 |
Page 2 | 1 | 2 |
Page 3 | 6 | 2 |
Company 2 | 4 | 0 |
Location 1 | 1 | 1 |
Page 1 | 1 | 2 |
Location 2 | 2 | 1 |
Page 1 | 2 | 2 |
Location 3 | 1 | 1 |
Page 1 | 1 | 2 |
<tbody>
</tbody>
Company | Location | Page | Time |
Company 1 | Location 1 | Page 1 | 2 |
Company 1 | Location 1 | Page 2 | 1 |
Company 1 | Location 1 | Page 3 | 6 |
Company 2 | Location 1 | Page 1 | 1 |
Company 2 | Location 2 | Page 1 | 2 |
Company 2 | Location 3 | Page 1 | 1 |
<tbody>
</tbody>
Any insight you can give me to solve this would be greatly appreciated.
-Meta1