I have a set of companies with the date they were founded and the date they were acquired by other company. I'd like to duplicate this observation as much times as the difference between the date the company was created and 2018, identifying each observation with a dummy variable that will be 1 in the year the company was acquired.

Thanks in advance for any suggestion!