Thanks so much for everybody's suggestion. I have hundreds of stores and need to compare any interested stores (usually less than 4 stores). Attached is a sample of data set. Astounding's code looks good, but will be time consuming, since I have hundred stores. Here is my data set, Store_id Customer_ID CAL 11542 CAL 11526 CHI 10069 CHI 11433 CHI 11542 GFC 11493 GFC 11526 GFC 10068 KAN 11482 KAN 11493 If I compare CAL with CHI, the result should be 11542. IF between CAL and GFC, the result should be 11526. If between GFC and KAN, the result should be 11493. If between CAL and KAN, result should be nothing. Thanks, Harry
... View more