Looking for help with a formula that requires some lookup/match/index across tabs

WD100

New Member
Joined
Mar 24, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

First thank you in advance for any and all help! I believe my challenge is that I am trying to match a number to a 2 way table and then pull pull a text string.

Tab A has a set of unique product numbers in Column C (For example purposes I only copied in a handful). Then Tabs B-F (tab B shown for example purposes) each have a unique set of "family codes" in Column B and the corresponding product numbers have bee identified to the right of the Family Code.

I am trying to write a formula in Column B of tab A that looks at Column C and then finds/matches it to the corresponding unique family code which was identified in Tabs B-F. For example, in Cell B2 of tab A, the formula would pull TC-1 and in cell B13 the formula would pull TC-3 and everything in-between.

If consolidating tabs B-F into one tab is needed I can do that as well.

Tab A
Numbers.PNG



Tab B

Family Code.PNG
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
First, list your sheet names (Tabs B through F) in a range of cells, let's say G2:G6. Then, in Tab A, enter the following formula in B2, and copy down:

=LET(SheetName,INDEX($G$2:$G$6,MATCH(TRUE,COUNTIF(INDIRECT("'"&$G$2:$G$6&"'!C2:I5"),C2)>0,0)),INDEX(INDIRECT("'"&SheetName&"'!B2:B5"),MATCH(TRUE,COUNTIF(OFFSET(INDIRECT("'"&SheetName&"'!C2:I5"),ROW(INDIRECT("2:5"))-2,0,1),C2)>0,0)))

Change the references accordingly. If you need help with amending the formula, post back.

Hope this helps!
 
Upvote 0
Solution
First, list your sheet names (Tabs B through F) in a range of cells, let's say G2:G6. Then, in Tab A, enter the following formula in B2, and copy down:

=LET(SheetName,INDEX($G$2:$G$6,MATCH(TRUE,COUNTIF(INDIRECT("'"&$G$2:$G$6&"'!C2:I5"),C2)>0,0)),INDEX(INDIRECT("'"&SheetName&"'!B2:B5"),MATCH(TRUE,COUNTIF(OFFSET(INDIRECT("'"&SheetName&"'!C2:I5"),ROW(INDIRECT("2:5"))-2,0,1),C2)>0,0)))

Change the references accordingly. If you need help with amending the formula, post back.

Hope this helps!
Amazing! Thank you!
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,707
Members
448,981
Latest member
recon11bucks

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