Compare and merge cells

Occasional Visitor

Hi guys! I'm trying to compare and merge cells. For example;


That's I got now.

Stock Name BARCODE

STOCK1        50085443

STOCK1        50085435

STOCK1        50086569


But I want to create like this:



STOCK1        50085443     50085435     50086569


Thanks for help and ideas!

1 Reply

Hi @rmzn74,

There are many ways to handle this problem, below is a solution via formula. 





Note: If your version of the office doesn't support the FILTER function, then feel free to use Excel Online, these functions are available free to use  (


Regards, Faraz Shaikh | MVP, MCT, MIE, MOS Master, Excel Expert

If you find the above solution resolved your query don't forget to mark it as the Official/Best Answer & like it to help the other members find it more.