lookup formula to return all result in table_array

Copper Contributor

Hi excel community,

what is the best lookup formula to return all result in table_array. 

 

This is my sample dataset

Customer nameItem soldDate
AliBooks1/1/2010
AliTable2/5/2010
AliFurniture6/8/2010
JamesFurniture7/1/2010
JamesBooks8/3/2010
JamesTable9/10/2010

 

I want to generate the report how much item sold by Customer name.

If i select customer name (Ali), i want all result for item sold and date for Ali will return as per below

Customer nameAli 
   
Item soldBooks1/1/2010
 Table2/5/2010
 Furniture6/8/2010
3 Replies

Hi,

 

Recently, I've replied to a similar question.

Please check it out here.

 

Regards

Alternatively you can use a pivot table. Please check the attached file.

This is a good solution!

But a problem that may occur when the same customer buys the same item again in a different day.

In this case, the PivotTable will show up only the most recent item, this is because you choose to summarize the values by max.

 

I think the most perfect solution is done by using Power Query as the below screenshot and the attached workbook.

Lookup Multiple Values Using Power Query.png

 

Try to change the customer name, then right-click and refresh the orange table and see how it works.