If you have several values in one cell separated by a comma, as your "Product name" data sample suggests, it will be very difficult to process with a formula. You will need to provide more than just a data sample like the above.
It also looks like you expect several values as output in one cell. Again, this is not easily accomplished.
I suggest that you step back from constructing hypothetical solutions that are based on assumptions that may or may not be met by Excel.
Instead, please explain the bigger picture. What are you trying to achieve? That is not "Merge the two files". What is the reason that makes you want to merge the files?
My answer will probably be shot down because I'm only asking questions for clarification and not providing a 'real' answer, but in order to even get started on your question, you need to provide a lot more background and I did not want to do this with comments.
Post more detail about your real situation. Post the bigger picture. Edit your question and provide that detail.