Hello Experts,
Needing your help please with lookup using multiple criteria's:
The above link has the workbook. I am trying to look up the values for each of the cells in B2:E4 for sheets "Cat B" and "Cat C" looking up values in "Sheet1" using the 3 criterias: category, week number & type. Please help with:
1) what's the best formula to look up those 3 criterias in the workbook? Can you help with the formula answer?
2) can you help with how to best combine "sheetname + substitute formula + match formula" into a cell address?
My workings below:
Thank You,
Joey
Needing your help please with lookup using multiple criteria's:
The above link has the workbook. I am trying to look up the values for each of the cells in B2:E4 for sheets "Cat B" and "Cat C" looking up values in "Sheet1" using the 3 criterias: category, week number & type. Please help with:
1) what's the best formula to look up those 3 criterias in the workbook? Can you help with the formula answer?
2) can you help with how to best combine "sheetname + substitute formula + match formula" into a cell address?
My workings below:
Working | Value | Formula |
row number for Cat B > | 4 | =MATCH(A1,Sheet1!A:A,0) |
Column letter for wk1 (weeknumber) > | B | =SUBSTITUTE(ADDRESS(1,MATCH(B1,Sheet1!1:1,0),4),"1","") |
Adding 2 to the above (address) formula to get the end section. That is each week always have 3 columns containing hat, shirt & shoe > | D | =SUBSTITUTE(ADDRESS(1,(MATCH(B1,Sheet1!1:1,0)+2),4),"1","") |
knowing above I could use Xlookup to return 457 > but I want to include the formulas for the moving columns for the week numbers | 457 | =XLOOKUP(A2,Sheet1!B2:D2,Sheet1!B4:D4,,0) |
I tried the formula on the right but couldn't get the filename right using CONCAT. Not sure how to incoporate sheetname+substitute formula + match formula) as a cell address | =XLOOKUP(A2,CONCAT("Sheet1!",SUBSTITUTE(ADDRESS(1,MATCH(B1,Sheet1!1:1,0),4),"1",""),2):CONCAT("Sheet1!",SUBSTITUTE(ADDRESS(1,(MATCH(B1,Sheet1!1:1,0)+2),4),"1",""),4),"1",""),2),CONCAT("Sheet1!",SUBSTITUTE(ADDRESS(1,MATCH(B1,Sheet1!1:1,0),4),"1",""),MATCH(A1,Sheet1!A:A,0)):CONCAT("Sheet1!",SUBSTITUTE(ADDRESS(1,(MATCH(B1,Sheet1!1:1,0)+2),4),"1",""),4),"1",""),MATCH(A1,Sheet1!A:A,0)),,0) |
Thank You,
Joey