Hello!

I am fairly new to stata, and I have spent quite some time on this website to find a solution to my problem (obviously without success)

Basically, I would like to allocate values from one variable (Description1) to a new variable (alloDescription1) based on particular values (i.e 47823 or 34637) within a particular variable (unique ID). The following two tables explain my current data situation and where I want to be.

Array


I much appreciate your help!!

Kind regards