By: Sourav Kundu

In reply to SUNZEEV.

Hello SUNZEEV,
Thank you for your comment. Here, we are providing two revised formulas to meet your requirements.
For simplicity, we have modified the dataset with two additional Company names.
To get all the device names for each company, write the following formula in E6 and press Enter.
=IFERROR(INDEX($B$5:$C$19,SMALL(IF($B$5:$B$19=E5,(ROW($B$5:$B$19)-ROWS(B1:B4)),""),(ROW($B$5:$B$19)-ROWS(B1:B4))),2),"")
You will get all the results of Samsung at once.
Now, drag the E6 cell to the right to H6 cell. You will get your desired results.

Another way is to use the FILTER function. For this method, write the following formula in E6 and press Enter.
=FILTER(C5:C19,B5:B19=E5)
Now, drag the E6 cell to the right to the H6 cell. You will get your desired results. The FILTER function is available on Excel 365 only.

You can download the workbook from the link below.
Answer.xlsx
We hope these methods will satisfy your queries. If you have further questions, you are always welcome.

Regards,
Sourav
ExcelDemy.