Finding value in first cell of rows where value appears within an array

TheBlueMan15

New Member
Joined
Aug 30, 2018
Messages
3
Hi, sorry that my title probably doesn't fit my question correctly, but I didn't know how to describe it.I have a table of document numbers and the other document numbers that are referenced inside:eg document 1 references documents 2, 3 and 4, document 2 references 1 and 3. What I'm looking for is a formula where I put in the document number and it tells me all the documents that it has been referenced in:eg I put in number 3 and it tells me that it was referenced by document 1 and 2.I tried index matching but was getting nowhere.Thanks in advance for the help!
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Sorry, wasn't sure how to do that! It's for when a document has a change, I need to be able to see how many documents that refer to it are affected. Here is my example table and expected output :) :

Document #Reference 1Reference 2Reference 3Reference 4Reference 5
123456Changed Document #
27891014
324567
4891012Documents that contain references to changed document
5346781
69101233
7456895
81012347
95678108
1012345 10

<colgroup><col width="87" span="7" style="width: 65pt;"><col width="393" style="width: 295pt;"></colgroup><tbody>
</tbody>
 
Upvote 0
Try


A
B
C
D
E
F
G
H
1
Document #​
Reference 1​
Reference 2​
Reference 3​
Reference 4​
Reference 5​
2
1​
2​
3​
4​
5​
6​
Changed Document #​
3
2​
7​
8​
9​
10​
1​
4​
4
3​
2​
4​
5​
6​
7​
5
4​
8​
9​
10​
1​
2​
Documents that contain references to changed document​
6
5​
3​
4​
6​
7​
8​
1​
7
6​
9​
10​
1​
2​
3​
3​
8
7​
4​
5​
6​
8​
9​
5​
9
8​
10​
1​
2​
3​
4​
7​
10
9​
5​
6​
7​
8​
10​
8​
11
10​
1​
2​
3​
4​
5​
10​
12

<tbody>
</tbody>


Array formula in H6 copied down
=IFERROR(INDEX(A$2:A$11,SMALL(IF(MMULT(--(B$2:F$11=$H$3),{1;1;1;1;1})>0,ROW(A$2:A$11)-ROW(A$2)+1),ROWS(H$6:H6))),"")
confirmed with Ctrl+Shift+Enter, not just Enter

Hope this helps

M.
 
Upvote 0
Also, in H6 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX($A$2:$A$11,SMALL(IF(ISNUMBER(IF($B$2:$F$11=$H$3,$A$2:$A$11)),ROW($A$2:$A$11)-ROW($A$2)+1),ROWS($H$6:H6))),"")
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

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