Combining If/or and vlookup across multiple sheets

Options

I have 4 sheets: NCR Summary sheet. Supplier A sheet, Supplier B sheet, and Supplier C sheet.

I want to pull information from individual supplier sheets to populate fields in the summary sheet. The summary sheet will already have the supplier name in a column and a unique identifier for each line in a column(NCR #).

I'm trying to build logic in a cell in the summary sheet that will use the Supplier name to know which sheet to reference and a vlookup to pull the specific data. i.e. Using the first line in the summary sheet shown below...To populate "Rejection Reason", the Supplier is "A", so go to sheet "Supplier A" and the NCR Number is "1", so return the value for row with NCR "1."

I can get a vlookup to work if I point the Rejection Reason cell specifically at the Supplier A sheet and return the value in the matching NCR row.

I cannot get it to use logic to determine which sheet reference to follow based on the value in the Supplier Name column.

I think I need something along the lines of:

=IF(OR(Supplier@row=A, (VLOOKUP([NCR Number]@row, {Supplier A Range 1}, 4)),"no data")), (OR(Supplier@row=B, (VLOOKUP([NCR Number]@row, {Supplier B Range 1}, 4)),"no data")),(OR(Supplier@row=C, (VLOOKUP([NCR Number]@row, {Supplier C Range 1}, 4)),"no data"))

Summary Sheet

image.png


One of the Supplier Sheets

image.png


Best Answers

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!