Hi @Melissa Obrien
I will give some explanations on my formula.
This formula is based on the premise that the data structure on each sheet of master file is consistent.
Then let's split this formula =VLOOKUP(A2,INDIRECT(LOOKUP(1,0/COUNTIF(INDIRECT("'[Master.xlsx]"&{"57 DSAM5 (REXC2 30 01)","60 RRSP (RPNA13401)","70 SS (RENK 14)"}&"'!b:b"),A2),"'[Master.xlsx]"&{"57 DSAM5 (REXC2 30 01)","60 RRSP (RPNA13401)","70 SS (RENK 14)"}&"'!b:H")),7,0)
.
- The first Indirect forumula: INDIRECT("'[Master.xlsx]"&{"57 DSAM5 (REXC2 30 01)","60 RRSP (RPNA13401)","70 SS (RENK 14)"}&"'!b:b" creates a reference to the column B area of the 3 sheets in my example. You can add all sheets of Master file in this formula with the same format.
'[Master.xlsx]
is the Master file name with symbole ';57 DSAM5 (REXC2 30 01)
is one of sheet names;'!b:b
is the rang of column B on these sheets with symbole '. - Then we use COUNTIF to count the number of times the "Iterm No." of cell A2 (Dynamics file) appears in column B of each worksheet of Master file:
COUNTIF(INDIRECT("'[Master.xlsx]"&{"57 DSAM5 (REXC2 30 01)","60 RRSP (RPNA13401)","70 SS (RENK 14)"}&"'!b:b"),A2)
This part returns a memory array like {0,0,1}, you can run this formula seperately to have a check. The number of times other than 0 is the worksheet where the "Iterm No." is found. - The format like: Lookup(1,0/(conditional), range) can return a text expression corresponding to the above worksheet range, such as: '[Master.xlsx]60 RRSP (RPNA13401)'!b:H. Please note, you can change the sheet names as yours, and
'b:H
can be changed as your data range on these sheets to search. - The second INDIRECT formula: INDIRECT(LOOKUP(1,0/COUNTIF(INDIRECT("'[Master.xlsx]"&{"57 DSAM5 (REXC2 30 01)","60 RRSP (RPNA13401)","70 SS (RENK 14)"}&"'!b:b"),A2),"'[Master.xlsx]"&{"57 DSAM5 (REXC2 30 01)","60 RRSP (RPNA13401)","70 SS (RENK 14)"}&"'!b:H")) is to transfer the text expression above to be a reference, and use this as the scope of the Vlookup formula query.
- At last: Vlookup(A2, the second INDIRECT formula, column number, 0) can return the data you want. For Vlookup function, please refer to this link.