Hello, im having trouble matching different excel dates with values.
I have a list of two data, say the daily spot oil price and daily closing prices of a stock.
I have the past 8 years data on both and values on each date, but on some days, either market was closed due to holidays and whatnot.
Like my oil prices start 2 jan 2003 and my stock starts 1 jan 2003, and then some are the same and some different. I want to match 1 date with the two values corresponding to the stock price and oil price without having to individually delete the dates from 2003 to 2010 where dates do not match
How would i do this in excel?
Ive attatched the file for further clarification.
Cheers.!
Try this,
Cheers,
“To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln
A slightly different alternative to the above but using the same setup
the above utilises binary search given the data is sorted by date and should calculate a bit quicker as a result.A2:D2: enter 0 G3: =IF(LOOKUP($F3,$A$2:$A$1988)=$F3,LOOKUP($F3,$A$2:$B$1988),"") copied down H3: =IF(LOOKUP($F3,$C$2:$C$1988)=$F3,LOOKUP($F3,$C$2:$D$1988),"") copied down
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
thank you so much guys!
the vlookup is very useful!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks