Formula to calculate value based on multiple cells

Copper Contributor

Hey all, another question for you.

I just learned about vlookup to bring cell values based on input in another cell, and would like suggestions for the following:

 

I enter an item name in A2, vlookup references the item in L column and puts in the value from the M column. This is simple enough, but I want to have the value based on a quantity that I enter as well as a serperate cost in another column to be brought in and multiplied by the quantity as well.

 

To clarify, say I enter "crayon" in A2, I would then want to add a quantity in B2 and have the cost+ in C2 and the base cost in D2. The cost+ and the base cost are both fixed values defined in column M and N respectively and the item name is in column L

 

Thank you in advance for the help.

2 Replies

@Keirgarth1960Never mind, figured it out. :)

Try this in C2, then copy to D2:
=$B2*
VLOOKUP($A2,$L$2:$N$100,
COLUMN()-1,0)