Forum Discussion
IF, THEN VLOOKUP Match, Return Cost Item
I have 3 Worksheets:
costs
input
output
Goal:
On input worksheet, when user selects state they live from drop down list choice, and "Yes" or "No" for each food item from from drop down list choice, the cost of the food from the costs sheet is returned on output worksheet. If the anwswer is No, then I want result to be 0.
"costs" worksheet
Cell A Cell B Cell C Cell D
1 State Apple Salad Sandwich
2 AK 1 2 7
3 CA 3 4 5
4 TX 2 6 9
"inputs" worksheet
What state are you in? (52 state drop down list)
Do you want an apple? (Yes or No)
Do you want an salad? (Yes or No)
Do you want an sandwich? (Yes or No)
"outputs" worksheet
_____ (cost of apple)
_____ (cost of salad)
_____ (cost of sandwich)
Example:
Alaksa.
Yes to apple.
No to salad.
Yes to sandwich.
output worksheet:
1 __ (cost of apple)
0 __ (cost of salad)
7 __ (cost of sandwich)
Brainstorming Solutions:
I know I need to use a combination of the IF and VLOOKUP functions but I am unable to figure it out. Please help.