Dear MrExcel,
To correct myself, this is the situation:
Three columns- A, B, and C

A B C
p 1 potato
q 1 tomato
r 1 ketchup
p 2 cheese
q 2 onions
r 2 garlic
p 3 peper
q 3 salt
r 3 eggs
. . .
. . .
. . .

What to write so that D1 (or D2, etc.) shows the item from the column C that has the same row number as the value q in the column A and as the value 2 in the column B? (that is onions here)

Thanks,
KHE/E