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:

 

Stock Name BARCODE    BARCODE2   BARCODE3

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. 

 

FarazShaikh_0-1659503043269.png

=TRANSPOSE(FILTER($B$2:$B$4,$D2=$A$2:$A$4))

 

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  (https://office.live.com/start/excel.aspx)

 

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.