Hi
I have the below data in a spreadsheet, columns A-D:
Code:
A B C D
Red Foo 1 Car
Blue Foo 2 Truck
Purple Foo 3 Lorry
Red Bar 4 Truck
Blue Bar 5 Moped
Purple Bar 6 Car
Using VBA (or a worksheet function if required) I would like to pass in the look for the corresponding Value(s) in Column D based on a value found in column A
e.g.
I pass "Red" to the function and I get returned:
"Car" and "Truck".
Essentially I am after the equivalent of:
Code:
SELECT D
FROM theRange
WHERE A = "Car"
Many thanks