Lookup for values in a column different than zero/empty

Occasional Contributor

Dear all, 


There is a way to lookup for values in a specific column but ignore empty cells or cells with zero?

For instance, I have a flow table, by product in which each line represent a different flows, but there are several entries for the same ID and only one of the row have the price. I need to have a similar VLOOKUP formula to extract only the price. 


IDPrice (% Quoted)
Product A0
Product A93,336
Product A0
Product B0
Product B0
Product B0
Product B157,706
Product B0
Product C0
Product C175,21
Product C0
Product C0
Product C0


Thank you and best regards



6 Replies


You could create a pivot table based on the flow table.

Add ID to the Rows area and Price (% Quoted) to the Values area.

Change the summary function for the value field to Max.



@Hans Vogelaar Thank you for your reply. I need to build a new organized table based on this information so I would like to have a way to push directly from first table, using formula if possible.
best response confirmed by Inesmateus (Occasional Contributor)


As variant



=INDEX(Table1[Price (% Quoted)], MATCH(1, INDEX( (Table1[ID]=E3)*(Table1[Price (% Quoted)]<>0)*(Table1[Price (% Quoted)]<>""),0),0))


Let's say your data are in A1:B100, with headers in row 1.


Enter the products in D2, D3 etc.

In E2, enter the formula


or if you have Excel 2016 or earlier, the following array formula confirmed with Ctrl+Shift+Enter:


Then fill down.

Works perfectly. Thank you.