Replacing non-numerical values in a matrix with corresponding numerical values from another matrix with header

2 views (last 30 days)
Hi!
I'll be very grateful if you ca help me with this issue which I even don't know how to ask for searching.
I have 2 Tables (in Excel for the moment):
1) One with the stock prices, more than 800 stocks for around 200 periods (like the grey table), and
2) One table with the portfolios holdings for the same number of periods — up to 20 random stocks which prices are somewhere in the big table with prices. (like the blue table)
I need to have a code to replace the stock name with the corresponding stock price in each period and have a resulting table as it is shown in the green table.
Thanks a lot for any help.
Simplified examples:

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!