One value, multiple matches

AxelB

New Member
Joined
Jun 8, 2016
Messages
4
Hi,

I hope someone can help me out on this one. I've searched Google, this Board, but I just can't seem to get it to work. Below is my table.
The trick here is that the Values in Column B, can be matched several times to values in Column A.

I started with a simple index, match and that was ok, it found the first of many matches, then I went further and put it all in an array, with a little help from Google I also figured out how to "expand" it so it would fill several colums with the matches. (See below), but it seems I just can't get past the first match and so I am stuck.

I hope someone can help me out :)

Table:
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]OTS
[/TD]
[TD]VIN
[/TD]
[TD]OTS #1
[/TD]
[TD]OTS #2
[/TD]
[TD]OTS #3
[/TD]
[TD]OTS #4
[/TD]
[/TR]
[TR]
[TD]0C6W
[/TD]
[TD]
[TABLE="width: 143"]
<tbody>[TR="class: grid"]
[TD]VF1AGVYA234567890
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]0C7W
[/TD]
[TD]0C8W
[/TD]
[TD]No Match
[/TD]
[TD]and so on
[/TD]
[/TR]
[TR]
[TD]0C6W
[/TD]
[TD]
[TABLE="width: 143"]
<tbody>[TR="class: grid"]
[TD]VF1AGVYA098765432
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]06TP
[/TD]
[TD]0C9W
[/TD]
[TD]09CPL
[/TD]
[TD]No Match
[/TD]
[/TR]
[TR]
[TD]0C8W
[/TD]
[TD]
[TABLE="width: 143"]
<tbody>[TR="class: grid"]
[TD]VF1AGVYA123456789
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0C8W
[/TD]
[TD]
[TABLE="width: 143"]
<tbody>[TR="class: grid"]
[TD]VF1AGVYA012345678
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]





It is about 9500 Rows and the OTS #1 , OTS #2 is not currently in the table, that is just what I want it to look like in the end ;)

Formulas tested so far:
Code:
[=IF(INDEX($A:$A;MATCH(B6;$B:$B;0))=A6;INDEX($A$15:$A$9500;MATCH(B6;$B$15:$B$9500;0));"test")/CODE]
- This provides me with the first match other than the current corresponding OTS/VIN, but not the NeXT in the list.. 

I also tried (As an array)[CODE][=IFISERROR(INDEX(OTS;SMALL((IF(VIN=$B2;ROW(OTS)- MIN(ROW(OTS))+1;COLUMNS($B$2:B2)))));"Ingen Match")/CODE] do be able to drag it out in cells C2, D2, E2 and so on to get the matches there, but it all just shows the first "New" match after it's corresponding OTS number. 

So I am stuck and not quite sure how to proceed as one VIN may have multiple matches in OTS and using multiple colums with index, match where I check the previous for what OTS it has there and so on, is something I wish to avoid.. 

Thanks in advance for any help :)

//Axel
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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