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:
OTS
VIN
OTS #1
OTS #2
OTS #3
OTS #4
0C6W

VF1AGVYA234567890

<tbody>
</tbody>
0C7W
0C8W
No Match
and so on
0C6W

VF1AGVYA098765432

<tbody>
</tbody>
06TP
0C9W
09CPL
No Match
0C8W

VF1AGVYA123456789

<tbody>
</tbody>
0C8W

VF1AGVYA012345678

<tbody>
</tbody>

<tbody>
</tbody>





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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,214,832
Messages
6,121,847
Members
449,051
Latest member
excelquestion515

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