tparmbru22
New Member
- Joined
- Sep 7, 2017
- Messages
- 15
I'm looking for help in creating a macro that can extract select column information and create new rows data but still keep the identifying information. Not all columns will have information and I only want to extract those that have data.
Below is an example of the survey data.
[TABLE="width: 640"]
<colgroup><col span="3"><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Date[/TD]
[TD]Store[/TD]
[TD]Name[/TD]
[TD]Type[/TD]
[TD]IT[/TD]
[TD]Staffing[/TD]
[TD]Freight[/TD]
[TD]Construction[/TD]
[/TR]
[TR]
[TD="align: right"]1/1/2019[/TD]
[TD="align: center"]123[/TD]
[TD]Joe[/TD]
[TD]New[/TD]
[TD]Comp Issue[/TD]
[TD] [/TD]
[TD]Missing Freight[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]2/1/2019[/TD]
[TD="align: center"]234[/TD]
[TD]Mike[/TD]
[TD]Reopen[/TD]
[TD]Comp Issue[/TD]
[TD]Short Staff[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]3/1/2019[/TD]
[TD="align: center"]345[/TD]
[TD]John[/TD]
[TD]New[/TD]
[TD] [/TD]
[TD]Short Staff[/TD]
[TD] [/TD]
[TD]Delay Construction[/TD]
[/TR]
[TR]
[TD="align: right"]4/1/2019[/TD]
[TD="align: center"]456[/TD]
[TD]Mary[/TD]
[TD]Expansion[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Missing Freight[/TD]
[TD]Delay Construction[/TD]
[/TR]
</tbody>[/TABLE]
Below is how I'd like the macro output to look.
[TABLE="width: 427"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Date[/TD]
[TD]Store[/TD]
[TD]Name[/TD]
[TD]Type[/TD]
[TD]Issue[/TD]
[TD]Details[/TD]
[/TR]
[TR]
[TD="align: right"]1/1/2019[/TD]
[TD="align: center"]123[/TD]
[TD]Joe[/TD]
[TD]New[/TD]
[TD]IT[/TD]
[TD]Comp Issue[/TD]
[/TR]
[TR]
[TD="align: right"]1/1/2019[/TD]
[TD="align: center"]123[/TD]
[TD]Joe[/TD]
[TD]New[/TD]
[TD]Freight[/TD]
[TD]Missing Freight[/TD]
[/TR]
[TR]
[TD="align: right"]2/1/2019[/TD]
[TD="align: center"]234[/TD]
[TD]Mike[/TD]
[TD]Reopen[/TD]
[TD]IT[/TD]
[TD]Comp Issue[/TD]
[/TR]
[TR]
[TD="align: right"]2/1/2019[/TD]
[TD="align: center"]234[/TD]
[TD]Mike[/TD]
[TD]Reopen[/TD]
[TD]Staffing[/TD]
[TD]Short Staff[/TD]
[/TR]
[TR]
[TD="align: right"]3/1/2019[/TD]
[TD="align: center"]345[/TD]
[TD]John[/TD]
[TD]New[/TD]
[TD]Staffing[/TD]
[TD]Short Staff[/TD]
[/TR]
[TR]
[TD="align: right"]3/1/2019[/TD]
[TD="align: center"]345[/TD]
[TD]John[/TD]
[TD]New[/TD]
[TD]Construction[/TD]
[TD]Delay Construction[/TD]
[/TR]
[TR]
[TD="align: right"]4/1/2019[/TD]
[TD="align: center"]456[/TD]
[TD]Mary[/TD]
[TD]Expansion[/TD]
[TD]Freight[/TD]
[TD]Missing Freight[/TD]
[/TR]
[TR]
[TD="align: right"]4/1/2019[/TD]
[TD="align: center"]456[/TD]
[TD]Mary[/TD]
[TD]Expansion[/TD]
[TD]Construction[/TD]
[TD]Delay Construction[/TD]
[/TR]
</tbody>[/TABLE]
Any help is greatly appreciated.
Below is an example of the survey data.
[TABLE="width: 640"]
<colgroup><col span="3"><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Date[/TD]
[TD]Store[/TD]
[TD]Name[/TD]
[TD]Type[/TD]
[TD]IT[/TD]
[TD]Staffing[/TD]
[TD]Freight[/TD]
[TD]Construction[/TD]
[/TR]
[TR]
[TD="align: right"]1/1/2019[/TD]
[TD="align: center"]123[/TD]
[TD]Joe[/TD]
[TD]New[/TD]
[TD]Comp Issue[/TD]
[TD] [/TD]
[TD]Missing Freight[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]2/1/2019[/TD]
[TD="align: center"]234[/TD]
[TD]Mike[/TD]
[TD]Reopen[/TD]
[TD]Comp Issue[/TD]
[TD]Short Staff[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]3/1/2019[/TD]
[TD="align: center"]345[/TD]
[TD]John[/TD]
[TD]New[/TD]
[TD] [/TD]
[TD]Short Staff[/TD]
[TD] [/TD]
[TD]Delay Construction[/TD]
[/TR]
[TR]
[TD="align: right"]4/1/2019[/TD]
[TD="align: center"]456[/TD]
[TD]Mary[/TD]
[TD]Expansion[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]Missing Freight[/TD]
[TD]Delay Construction[/TD]
[/TR]
</tbody>[/TABLE]
Below is how I'd like the macro output to look.
[TABLE="width: 427"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Date[/TD]
[TD]Store[/TD]
[TD]Name[/TD]
[TD]Type[/TD]
[TD]Issue[/TD]
[TD]Details[/TD]
[/TR]
[TR]
[TD="align: right"]1/1/2019[/TD]
[TD="align: center"]123[/TD]
[TD]Joe[/TD]
[TD]New[/TD]
[TD]IT[/TD]
[TD]Comp Issue[/TD]
[/TR]
[TR]
[TD="align: right"]1/1/2019[/TD]
[TD="align: center"]123[/TD]
[TD]Joe[/TD]
[TD]New[/TD]
[TD]Freight[/TD]
[TD]Missing Freight[/TD]
[/TR]
[TR]
[TD="align: right"]2/1/2019[/TD]
[TD="align: center"]234[/TD]
[TD]Mike[/TD]
[TD]Reopen[/TD]
[TD]IT[/TD]
[TD]Comp Issue[/TD]
[/TR]
[TR]
[TD="align: right"]2/1/2019[/TD]
[TD="align: center"]234[/TD]
[TD]Mike[/TD]
[TD]Reopen[/TD]
[TD]Staffing[/TD]
[TD]Short Staff[/TD]
[/TR]
[TR]
[TD="align: right"]3/1/2019[/TD]
[TD="align: center"]345[/TD]
[TD]John[/TD]
[TD]New[/TD]
[TD]Staffing[/TD]
[TD]Short Staff[/TD]
[/TR]
[TR]
[TD="align: right"]3/1/2019[/TD]
[TD="align: center"]345[/TD]
[TD]John[/TD]
[TD]New[/TD]
[TD]Construction[/TD]
[TD]Delay Construction[/TD]
[/TR]
[TR]
[TD="align: right"]4/1/2019[/TD]
[TD="align: center"]456[/TD]
[TD]Mary[/TD]
[TD]Expansion[/TD]
[TD]Freight[/TD]
[TD]Missing Freight[/TD]
[/TR]
[TR]
[TD="align: right"]4/1/2019[/TD]
[TD="align: center"]456[/TD]
[TD]Mary[/TD]
[TD]Expansion[/TD]
[TD]Construction[/TD]
[TD]Delay Construction[/TD]
[/TR]
</tbody>[/TABLE]
Any help is greatly appreciated.