Hey all!
I am processing data downloaded from a Bloomberg terminal for over 8000 firms, but I am experiencing difficulty. The data set is in the current format:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]AAPL[/TD]
[TD]BAC[/TD]
[/TR]
[TR]
[TD]1/1/2018[/TD]
[TD]0.0430[/TD]
[TD]-0.0131[/TD]
[/TR]
[TR]
[TD]1/2/2018[/TD]
[TD]4.6958[/TD]
[TD]0.1438[/TD]
[/TR]
[TR]
[TD]1/3/2018[/TD]
[TD]0.8888[/TD]
[TD]-0.1045[/TD]
[/TR]
[TR]
[TD]1/4/2018[/TD]
[TD]1.0708[/TD]
[TD]-0.4836[/TD]
[/TR]
[TR]
[TD]1/5/2018[/TD]
[TD]2.5748[/TD]
[TD]-0.3809[/TD]
[/TR]
</tbody>[/TABLE]
I need the data to be in the following format:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Ticker[/TD]
[TD]RET[/TD]
[/TR]
[TR]
[TD]1/1/2018[/TD]
[TD]AAPL[/TD]
[TD]0.0430[/TD]
[/TR]
[TR]
[TD]1/2/2018[/TD]
[TD]AAPL[/TD]
[TD]4.6958[/TD]
[/TR]
[TR]
[TD]1/3/2018[/TD]
[TD]AAPL[/TD]
[TD]0.8888[/TD]
[/TR]
[TR]
[TD]1/4/2018[/TD]
[TD]AAPL[/TD]
[TD]1.0708[/TD]
[/TR]
[TR]
[TD]1/5/2018[/TD]
[TD]AAPL[/TD]
[TD]2.5748[/TD]
[/TR]
[TR]
[TD]1/1/2018[/TD]
[TD]BAC[/TD]
[TD]-0.0131[/TD]
[/TR]
[TR]
[TD]1/2/2018[/TD]
[TD]BAC[/TD]
[TD]0.1438[/TD]
[/TR]
[TR]
[TD]1/3/2018[/TD]
[TD]BAC[/TD]
[TD]-0.1045[/TD]
[/TR]
[TR]
[TD]1/4/2018[/TD]
[TD]BAC[/TD]
[TD]-0.4836[/TD]
[/TR]
[TR]
[TD]1/5/2018[/TD]
[TD]BAC[/TD]
[TD]-0.3809[/TD]
[/TR]
</tbody>[/TABLE]
I'm sure there's a way to do this using OFFSET and other tools but I can't figure it out. If need be, VBA is fine too, but formulas would be preferred if at all possible. Thanks in advance!
I am processing data downloaded from a Bloomberg terminal for over 8000 firms, but I am experiencing difficulty. The data set is in the current format:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]AAPL[/TD]
[TD]BAC[/TD]
[/TR]
[TR]
[TD]1/1/2018[/TD]
[TD]0.0430[/TD]
[TD]-0.0131[/TD]
[/TR]
[TR]
[TD]1/2/2018[/TD]
[TD]4.6958[/TD]
[TD]0.1438[/TD]
[/TR]
[TR]
[TD]1/3/2018[/TD]
[TD]0.8888[/TD]
[TD]-0.1045[/TD]
[/TR]
[TR]
[TD]1/4/2018[/TD]
[TD]1.0708[/TD]
[TD]-0.4836[/TD]
[/TR]
[TR]
[TD]1/5/2018[/TD]
[TD]2.5748[/TD]
[TD]-0.3809[/TD]
[/TR]
</tbody>[/TABLE]
I need the data to be in the following format:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Ticker[/TD]
[TD]RET[/TD]
[/TR]
[TR]
[TD]1/1/2018[/TD]
[TD]AAPL[/TD]
[TD]0.0430[/TD]
[/TR]
[TR]
[TD]1/2/2018[/TD]
[TD]AAPL[/TD]
[TD]4.6958[/TD]
[/TR]
[TR]
[TD]1/3/2018[/TD]
[TD]AAPL[/TD]
[TD]0.8888[/TD]
[/TR]
[TR]
[TD]1/4/2018[/TD]
[TD]AAPL[/TD]
[TD]1.0708[/TD]
[/TR]
[TR]
[TD]1/5/2018[/TD]
[TD]AAPL[/TD]
[TD]2.5748[/TD]
[/TR]
[TR]
[TD]1/1/2018[/TD]
[TD]BAC[/TD]
[TD]-0.0131[/TD]
[/TR]
[TR]
[TD]1/2/2018[/TD]
[TD]BAC[/TD]
[TD]0.1438[/TD]
[/TR]
[TR]
[TD]1/3/2018[/TD]
[TD]BAC[/TD]
[TD]-0.1045[/TD]
[/TR]
[TR]
[TD]1/4/2018[/TD]
[TD]BAC[/TD]
[TD]-0.4836[/TD]
[/TR]
[TR]
[TD]1/5/2018[/TD]
[TD]BAC[/TD]
[TD]-0.3809[/TD]
[/TR]
</tbody>[/TABLE]
I'm sure there's a way to do this using OFFSET and other tools but I can't figure it out. If need be, VBA is fine too, but formulas would be preferred if at all possible. Thanks in advance!