Lookup values and out horizontally

Steve1977

New Member
Joined
May 16, 2019
Messages
33
I've done Array formula's before and got them working, but for whatever reason, it's not working on my current information.
Currently I've two sheets:

Master Sheet - 'Sheet1M'
2nd Sheet - 'Sheet2S'


Sheet1M contains the following:

60521235

<tbody>
</tbody>
PART01
60521236

<tbody>
</tbody>
PART02
60521237

<tbody>
</tbody>
PART03
542184

<tbody>
</tbody>
PART04
542920

<tbody>
</tbody>
PART05
545069

<tbody>
</tbody>
PART06
60556032

<tbody>
</tbody>
PART07

<tbody>
</tbody>


Sheet2S contains the following:

60521235REF1
60521236REF2
60521236REF3
542184REF4
542920REF5
542920REF6
60556032REF7

<tbody>
</tbody>


So notice how the second sheet has instances where the number in Column A is duplicated because there's more than one ref in Column B

60521235PART01REF1
60521236PART02REF2REF3
60521237PART03
542184PART04REF4
542920PART05REF5REF6
545069

<tbody>
</tbody>
PART06
60556032PART07REF7

<tbody>
</tbody>


When I've done similar things previously this is the Array Formula I have used:
{=INDEX(Sheet2S!$A$2:$B$155508,SMALL(IF(Sheet2S!$A$2:$A$155508=Sheet1M!$A2,ROW(Sheet2S!$A$2:$A$155508)-1),COLUMNS(Sheet1M!$C2)),2)}

But for whatever reason it's simply not working now and I don't know why.

If anyone can help me where I'm going wrong or even seek a resolution via VBA code it would be very much appreciated!
 
Last edited:

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
The last part of the formula should be
COLUMNS($A$1:A$1)
 
Upvote 0
Or you could use a non-array formula
=IFERROR(INDEX(Sheet2S!$B$2:$B$8,AGGREGATE(15,6,(ROW(Sheet2S!$B$2:$B$8)-ROW(Sheet2S!$B$2)+1)/(Sheet2S!$A$2:$A$8=$A2),COLUMNS($A$1:A$1))),"")
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

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