Forum Discussion

sillyname's avatar
sillyname
Copper Contributor
Feb 16, 2022
Solved

excel reference formulas- pricing to ingredients

i have a list of ingredients with costs in the next column and want to link those to separate recipes- shea butter is .31/oz so in a recipe i type shea butter and a 3 next column, and want to know cost of recipe.. help!

  • sillyname 

    Let's say the list of ingredients with their cost is on a sheet named Ingredients, in A2:B100.

    Somewhere else (probably on another sheet, you enter ingredients in A2, A3 etc.

    In B2, enter the formula

     

    =IFERROR(VLOOKUP(A2, Ingredients!$A$2:$B$100, 2, FALSE), "")

     

    or

     

    =XLOOKUP(A2, Ingredients!$A$2:$A$100, Ingredients!$B$2:$B$100, "")

     

    Fill down as far as you want.

2 Replies

  • sillyname 

    Let's say the list of ingredients with their cost is on a sheet named Ingredients, in A2:B100.

    Somewhere else (probably on another sheet, you enter ingredients in A2, A3 etc.

    In B2, enter the formula

     

    =IFERROR(VLOOKUP(A2, Ingredients!$A$2:$B$100, 2, FALSE), "")

     

    or

     

    =XLOOKUP(A2, Ingredients!$A$2:$A$100, Ingredients!$B$2:$B$100, "")

     

    Fill down as far as you want.

Resources