Hello
I'm totally new in excel and trying to learn macro, I searched the forum and didn't find the correct macro but now I need a macro to search a table for cells with value, then copy row and column headers and the cell value in a row in new sheet. as example:
[TABLE="width: 500"]
<tbody>[TR]
[TD]city[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD][/TD]
[TD]x[/TD]
[TD][/TD]
[TD]z[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]y[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]w[/TD]
[/TR]
</tbody>[/TABLE]
output:
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]2[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]4[/TD]
[TD]z[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]1[/TD]
[TD]y[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]4[/TD]
[TD]w[/TD]
[/TR]
</tbody>[/TABLE]
thanks
I'm totally new in excel and trying to learn macro, I searched the forum and didn't find the correct macro but now I need a macro to search a table for cells with value, then copy row and column headers and the cell value in a row in new sheet. as example:
[TABLE="width: 500"]
<tbody>[TR]
[TD]city[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD][/TD]
[TD]x[/TD]
[TD][/TD]
[TD]z[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]y[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]w[/TD]
[/TR]
</tbody>[/TABLE]
output:
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]2[/TD]
[TD]x[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]4[/TD]
[TD]z[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]1[/TD]
[TD]y[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]4[/TD]
[TD]w[/TD]
[/TR]
</tbody>[/TABLE]
thanks