Assuming
1) your Product table is a 2 column named range called Products
2) Column A contains the value you want to look up in the table.
=IF(ISNA(VLOOKUP(B2,Products,2,FALSE)),0,VLOOKUP(B 2,Products,2,FALSE))
If B2 = Product A, the formula returns 5
If B2 = Product Z (not in the list) the formula returns 0
If you would prefer that the formula return #N/A if the product isn't in the
list you can use this simpler variation instead:
=VLOOKUP(B2,Products,2,FALSE)
HTH,
--
George Nicholson
Remove 'Junk' from return address.
"LB" wrote in message
...
Does anyone know which function(s) I can use to pull certain names from a
list that meet either of two criteria? Below is list of all products
available: I only want to pull products and corresponding data that
either
do not have "sub-product" (i.e. Product A,C,D) or is labled
"sub-product;1"
(i.e. Product B;1, Product E;1 Product F;1).
Product Name Total Sales
Product A 5
Product B;1 10
Product B;2 15
Product B;3 2
Product C 50
Product D 20
Product E;1 25
Product E;2 10
Product E;3 31
Product F;1 34
Product F;2 20
Product G 50
Product H 34
|