How to get the value horizantally

I have an excel sheet where I was asked to capture all the headers where there is any number as per the type is given ( for example BDMK01). I am confused about how to do it so, as Vlookup will not work in such kind of structure of the data table.
The answer would be: LIC-MX65-SEC-7YR, CON-RO4P-MX65-HW…etc

Kindly suggest if anyone of you have any idea.

Thanks in Advance
Bijay Jha

Good afternoon Bijay,

I’m sure there’s a much more elegant solution, but you could add a formula to the end of each row similar to the attached screenshot to accomplish your goal.

Thanks for your Input, Chenderson

But I am trying to get on some other way either though loop or any.

For example: image