faizal Izham
New Member
- Joined
- Oct 26, 2017
- Messages
- 7
I would like to seek help from the expert in Mr.Excel with my issue below.
i have some sample data as per below. Host is in 1 table and Port is on another table.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Host[/TD]
[TD][/TD]
[TD]Port1[/TD]
[TD]Port2[/TD]
[TD]Port3[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD][/TD]
[TD]1A[/TD]
[TD]1B[/TD]
[TD]1C[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I would like to output the data as per below in another sheet.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Host[/TD]
[TD]Output[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD]Host1_1A[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD]Host1_1B[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD]Host1_1C[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD]Host2_1A[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD]Host2_1B[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD]Host2_1C[/TD]
[/TR]
</tbody>[/TABLE]
Below is other sample on the data.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[/TR]
[TR]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid"]
<tbody>[TR]
[TD]Host[/TD]
[TD][/TD]
[TD]Port1[/TD]
[TD]Port2[/TD]
[TD]Port3[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD][/TD]
[TD]1A[/TD]
[TD]1B[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Host3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
If the Column in Port is empty it will skipped to the next host and loop with the available port.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Host[/TD]
[TD]Output[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD]Host1_1A[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD]Host1_1B[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD]Host2_1A[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD]Host2_1B[/TD]
[/TR]
[TR]
[TD]Host3[/TD]
[TD]Host3_1A[/TD]
[/TR]
[TR]
[TD]Host3[/TD]
[TD]Host3_1B[/TD]
[/TR]
</tbody>[/TABLE]
Hope someone can help me with the formula to automatically loop around the data.
Thank You in advance for helping.
i have some sample data as per below. Host is in 1 table and Port is on another table.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Host[/TD]
[TD][/TD]
[TD]Port1[/TD]
[TD]Port2[/TD]
[TD]Port3[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD][/TD]
[TD]1A[/TD]
[TD]1B[/TD]
[TD]1C[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I would like to output the data as per below in another sheet.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Host[/TD]
[TD]Output[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD]Host1_1A[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD]Host1_1B[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD]Host1_1C[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD]Host2_1A[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD]Host2_1B[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD]Host2_1C[/TD]
[/TR]
</tbody>[/TABLE]
Below is other sample on the data.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[/TR]
[TR]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid"]
<tbody>[TR]
[TD]Host[/TD]
[TD][/TD]
[TD]Port1[/TD]
[TD]Port2[/TD]
[TD]Port3[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD][/TD]
[TD]1A[/TD]
[TD]1B[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Host3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
If the Column in Port is empty it will skipped to the next host and loop with the available port.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Host[/TD]
[TD]Output[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD]Host1_1A[/TD]
[/TR]
[TR]
[TD]Host1[/TD]
[TD]Host1_1B[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD]Host2_1A[/TD]
[/TR]
[TR]
[TD]Host2[/TD]
[TD]Host2_1B[/TD]
[/TR]
[TR]
[TD]Host3[/TD]
[TD]Host3_1A[/TD]
[/TR]
[TR]
[TD]Host3[/TD]
[TD]Host3_1B[/TD]
[/TR]
</tbody>[/TABLE]
Hope someone can help me with the formula to automatically loop around the data.
Thank You in advance for helping.