Brain teaser, VBA code needed to prevent insanity, vlook up index and match

Russellsky

New Member
Joined
Aug 31, 2015
Messages
12
Firstly a massive thank you anybody who is wiling to help me.....

my problem starts with information that has been given to me is very limited but should be enough to solve my problem
i need to identify how many adjacent structures each structure has, basically there will always be one or up to seven
the information given to me is also not in any order so one structure might appear multiple times in one column or alternate
in columns as the sequence is followed, also there might up to maximum of 2 bays between structures

so this is what i have been able to do so far, on sheet two i have merged the two coloums and removed duplicates to give me
a list of all the structures, i have then duplicated information on sheet one but switched the structure ids information for the
duplicated information so that Bay still has the correct structures assigned to it
i have then tried to use index and match back to the first sheet to find the adjacent structures and remove
duplicate structures. in the end i just made a massive stuff up of it and started doing it manually, only problem with that is i have
30 000 to do like this,

please if any body can find it in their heart to help


BAYStructure 1 Pick IDStructure 2 Pick ID
B256315S1031855S1031856
B256314S1031856S1031857
B256313S1031857S1031858
B256312S1031858S1031859
B256311S1031859S1031860
B256310S1031860S1031861
B256309S1031861S1031862
B1076211S1031862S1830436
B1489045S1032012S2280348
B254651S1039241S1039242
B1076015S1039242S1830240
B256692S1082299S1082300
B1076257S1082300S1830478
B254588S1093398S1093399
B1076013S1093398S1830230
B256949S1093411S1093413
B1379983S1093411S1909383
B256951S1093412S1093414
B256950S1093412S1093413
B1512033S1093414S2352540
B256605S1132631S1132632
B256606S1132632S1132634

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>



this the format i need to get it to, i have manually done the first 2

Structure 1 Pick IDADJ Structure 1ADJ Structure 2ADJ Structure 3ADJ Structure 4ADJ Structure 5ADJ Structure 6
S1031855S1031856
S1031856S1031855S1031857
S1031857
S1031858
S1031859
S1031860
S1031861
S1031862
S1032012
S1039241
S1039242
S1082299
S1082300
S1093398
S1093411
S1093412
S1093414
S1132631
S1132632
S1830436
S2280348
S1830240
S1830478
S1093399
S1830230
S1093413
S1909383
S2352540
S1132634

<colgroup><col><col span="6"></colgroup><tbody>
</tbody>
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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