Simple date matching. Please help

Hello

Below are 4 columns. ALL DATE, PRICE, MARKET OPEN and CLOSE. ALL DATE has all of the dates in the year. MARKET OPEN has dates where the stock market was open. CLOSE has the closing prices for a stock. I Would like the PRICE column to produce the CLOSE prices on the days where there is a MARKET OPEN and place an “N/A” on dates where the market is closed.

 

These are the four columns:

ALL DATE PRICE MARKET OPEN CLOSE
2000-01-01
2000-01-01 24.50
2000-01-02 2000-01-02 25.15
2000-01-03   2000-01-04 24.94
2000-01-04   2000-01-05 24.75
2000-01-05   2000-01-06 25.31
2000-01-06   2000-01-07 25.18
2000-01-07   2000-01-08 24.84
2000-01-08   2000-01-10 25.09
2000-01-09      

2000-01-10

 

End result should look like:

 

ALL DATE PRICE MARKET OPEN CLOSE
2000-01-01
24.50 2000-01-01 24.50
2000-01-02 25.15 2000-01-02 25.15
2000-01-03 N/A 2000-01-04 24.94
2000-01-04 24.94 2000-01-05 24.75
2000-01-05 24.75 2000-01-06 25.31
2000-01-06 25.31 2000-01-07 25.18
2000-01-07 25.18 2000-01-08 24.84
2000-01-08 24.84 2000-01-10 25.09
2000-01-09

N/A

   
2000-01-10                 

What formula should I put into the PRICE column for this to work? 
Not sure if the formatting will look correct once this is posted.

Any help would be very much appreciated.
Thank you!

By: Jesse

Leave a Reply

Your email address will not be published. Required fields are marked *