Multiple Custom sorting with addition of a new column in between sort

DrPacman07

New Member
Joined
Apr 27, 2015
Messages
1
Hi Sir/Madam,

Good day!

I am currently working on a scenario ranking and assignment of the probabilities process wherein I need to sort an array of multiple columns (smallest to largest) based on a specific column. After which I need to add a new column (the set of probabilities) to be included in the array of columns for sorting. These processes are repeated until the array of columns are sorted X times ( X is based on a specific predetermined columns).
Example (smaller scale)
(Initial Data)
ABCDEFGH
1Probability Generator
2Probability Generator Factors0.54310.48390.5431(will change for each Column depending on the factors)
312090120
4
5Data12
60.0790.0570.0050.010.0180.3
70.090.0070.0110.0330.070.4
80.0110.0650.0640.0430.0720.1
90.010.0670.0680.0230.0740.2
First Sort Based on column 1 then add the generated probability
ABCDEFGH
1Probability Generator
2Probability Generator Factors0.54310.48390.5431(will change for each Column depending on the factors)
312090120
4
5Data12
60.0790.0570.0050.010.0180.30.3
70.010.0670.0680.0230.0740.40.4
80.090.0070.0110.0330.070.10.1
90.0110.0650.0640.0430.0720.20.2
Second Sort Based on column 2 then add the generated probability
ABCDEFGHIJ
1(X)Probability Generator
2Probability Generator Factors0.54310.48390.4839(will change for each Column depending on the factors)
31209090
4
5Data12
60.0790.0570.0050.010.0180.30.50.5
70.090.0070.0110.0330.070.10.20.2
80.0110.0650.0640.0430.0720.20.20.2
90.010.0670.0680.0230.0740.40.10.1

<colgroup><col span="8"><col><col><col></colgroup><tbody>
</tbody>
Note:
*The probability generator factors will be pasted below (X) to generate new probabilities
*This is just a small scale example of the problem, normally we do multiple times (100x)

I hope you can help me do a macro program to make my life easier. :)

Thanks A lot.
 
Last edited:

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,216,161
Messages
6,129,216
Members
449,494
Latest member
pmantey13

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top