im currently learning excel and trying to do some excercise on excel Vlookup the current question that i had is
- find the price product id
- find the price by product id
- find the stock by product id
- find product name by ID
- find product name by stock
- find product price by name
i can solve 1 - 6 question and always getting error on question 6 i tried
=VLOOKUP(I20;C6:D10;2;0)
and having #N/A I dont understand why, pls help :)
CodePudding user response:
You can't use Vlookup()
to return price by product name because Vlookup()
always search on first column of table and in your case product name is second column (as per your current formula). Use INDEX()/MATCH()
in this case like-
=INDEX(C6:C10,MATCH(I20,D6:D10,0))