3 lists into 1, sorted and then split into 2 lists again

MixedUpExcel

Board Regular
Joined
Apr 7, 2015
Messages
206
Hi,

Please note the following request will be to action this only in Excel - I'm on a works pc and don't have other software available to do this.

I have 3 lists of product codes.

The codes are in a random order and can be duplicated across the the 3 columns.

Each product code has an associated code which needs to remain in the column next to the product code it was originally next to.

Example below:

Product CodeAssoc. CodeProduct CodeAssoc. CodeProduct CodeAssoci. Code
ABC123AAAJHG135HHHRKG134OOO
XYS456BBBABC123IIIEKT526PPP
ABC123CCCJFH783JJJQWE987QQQ
MST564DDDMST563KKKADD654RRR
LRT753EEEPRT852LLLJHE483SSS
ABC123FFFLRT753MMMABC123TTT
MST564GGGABC963NNNPRT852VVV

<tbody>
</tbody>

I basically need to get column 4 & 5 under columns 1 & 2 and column 7 & 8 under columns 1 & 2 (making it a single column with an adjacent column with the Associated Products.

I then need to sort the product code (column 1) in alphabetical order with column 2 staying next to the code it's originally next to, like it would in a manual sort.

The end result would be:

ABC123AAA
ABC123CCC
ABC123FFF
ABC123III
ABC123TTT
ABC963NNN
ADD654RRR
EKT526PPP
JFH783JJJ
JHE483SSS
JHG135HHH
LRT753EEE
LRT753MMM
MST563KKK
MST564DDD
MST564GGG
PRT852LLL
PRT852VVV
QWE987QQQ
RKG134OOO
XYS456BBB

<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>

All this is straight forward to do with vba coding.

The problem I have is Column 1 = 500,000 products; Column 4 = 500,000 products; Column 7 = 400,000 products. Total is more than 1,048,576 rows.

Once it is all sorted, it will then need to be split over 2 (4 including associated codes) columns (due to exceeding the Excel Row limit)

Suggestions please?
 

Some videos you may like

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Watch MrExcel Video

Forum statistics

Threads
1,123,342
Messages
5,601,066
Members
414,426
Latest member
fraru

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
Top