match and replace

Copper Contributor

I wish to know which customer group does the most purchase in my Sales Receipt sheet

However I only have customer ID on this sheet so I assume I have to match it to ID in the other sheet that has Customer ID, Year and Generation Categories. 


Can someone help me find a formula where I compare customer IDs in two sheets and if they match then the category "baby boomer, gen X" pops up in the first sheet. 


I am open to finding different ways to solve the same purpose


I am currently doing this manually and its a lot of data to match Sales receiptSales receiptCustomer ID and categoryCustomer ID and categorySales receiptSales receipt 

1 Reply
Have a look at the XLOOKUP function in Help. It should get you there. But if you're summarizing this data you probably are better off creating a pivot table using the data model and then joining those two tables so you can drag the Baby boomer column from table A to the pivot table and the column you want to summarize from table B to the pivot table.