Consider the table below
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]COL1[/TD]
[TD]COL2[/TD]
[TD]COL3[/TD]
[TD]COL4[/TD]
[TD][/TD]
[TD]EXPECTED RESULT[/TD]
[/TR]
[TR]
[TD]ROW1
[/TD]
[TD]100[/TD]
[TD]200[/TD]
[TD]100[/TD]
[TD]300[/TD]
[TD][/TD]
[TD]COL1, COL3[/TD]
[/TR]
[TR]
[TD]ROW2[/TD]
[TD]200[/TD]
[TD]100[/TD]
[TD]50[/TD]
[TD]400[/TD]
[TD][/TD]
[TD]COL3[/TD]
[/TR]
[TR]
[TD]ROW3[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD][/TD]
[TD]COL1,COL2,COL3,COL4[/TD]
[/TR]
[TR]
[TD]ROW4[/TD]
[TD]900[/TD]
[TD]900[/TD]
[TD]900[/TD]
[TD]900[/TD]
[TD][/TD]
[TD]COL1,COL2,COL3,COL4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
as an example i have added just four rows but actual data contains millions of rows. I want to pick the column header of the minimum value. e.g. in ROW1, COL1 and COL3 has minimum value so 'EXPECTED RESULT' columns is populated with relevant columns.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]COL1[/TD]
[TD]COL2[/TD]
[TD]COL3[/TD]
[TD]COL4[/TD]
[TD][/TD]
[TD]EXPECTED RESULT[/TD]
[/TR]
[TR]
[TD]ROW1
[/TD]
[TD]100[/TD]
[TD]200[/TD]
[TD]100[/TD]
[TD]300[/TD]
[TD][/TD]
[TD]COL1, COL3[/TD]
[/TR]
[TR]
[TD]ROW2[/TD]
[TD]200[/TD]
[TD]100[/TD]
[TD]50[/TD]
[TD]400[/TD]
[TD][/TD]
[TD]COL3[/TD]
[/TR]
[TR]
[TD]ROW3[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD]100[/TD]
[TD][/TD]
[TD]COL1,COL2,COL3,COL4[/TD]
[/TR]
[TR]
[TD]ROW4[/TD]
[TD]900[/TD]
[TD]900[/TD]
[TD]900[/TD]
[TD]900[/TD]
[TD][/TD]
[TD]COL1,COL2,COL3,COL4[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
as an example i have added just four rows but actual data contains millions of rows. I want to pick the column header of the minimum value. e.g. in ROW1, COL1 and COL3 has minimum value so 'EXPECTED RESULT' columns is populated with relevant columns.