I am trying to do the following (with stocks):

In workbook A:
I have one template. It has 4 columns - date,time,symbol A price,
symbol B price.
I also have 2 empty cells - one for each stock of the pair that I want to
analyze.

In Workbook B (my database/data file):
I have about 50 different worksheets, one each for a differnt stock, each with 3 columns - date, time, price for the respective stock.

I would like to know how I could fetch data from workbook B (from the respective worksheet holding data) for the symbol that I type in one of the two empty cells in the template and paste it into the symbol A price column, and similarly into the symbol B column when I type the symbol for the second stock in the second empty cell (the date and time is common to both stocks).

any help would be appreciated.