This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I think you first need to transpose your data so it's long rather than wide, then look at how to identify the same names (in your example it was easy because you just need to remove the number but I suspect your actual data will be much harder). After that you can crosstab the data back into it's original format.
I'm not expecting your final workflow to be a simple as this but this should get you started.
If you want to post some examples of the actual headers that you are getting I can help you further