thanhvanchi
12-05-2016, 08:02 PM
Hello everyone!
I need your help and expertise here. I'm trying to get my head around VBA to sort horizontal rows based on comparison of certain values under specific column headings.
Before the results are as shown in the URL image below.
ColumnA ColumnB ColumnC ColumnD ColumnE ColumnF ColumnG ColumnH
111 222 333 444 555 666 777 888
ColumnB and ColumnF have similar header name like "cost_default_smsc_1" and "cost_default_smsc_2". The cost will be compared and then display in ascending order.
Taking for example, ColumnF of 666 is cheaper than ColumnB of 222.
Column A, B,C,D belonged to a set of product, while E,F,G,H belong to another set. There are up to 10 products.
The resulting output in this case will be,
ColumnA ColumnB ColumnC ColumnD ColumnE ColumnF ColumnG ColumnH
555 666 777 888 111 222 333 444
Thank's a lot!
I need your help and expertise here. I'm trying to get my head around VBA to sort horizontal rows based on comparison of certain values under specific column headings.
Before the results are as shown in the URL image below.
ColumnA ColumnB ColumnC ColumnD ColumnE ColumnF ColumnG ColumnH
111 222 333 444 555 666 777 888
ColumnB and ColumnF have similar header name like "cost_default_smsc_1" and "cost_default_smsc_2". The cost will be compared and then display in ascending order.
Taking for example, ColumnF of 666 is cheaper than ColumnB of 222.
Column A, B,C,D belonged to a set of product, while E,F,G,H belong to another set. There are up to 10 products.
The resulting output in this case will be,
ColumnA ColumnB ColumnC ColumnD ColumnE ColumnF ColumnG ColumnH
555 666 777 888 111 222 333 444
Thank's a lot!