So I have a list of dates set by a column which lists 1w, 2w, 3w (weeks from now), 1m, 2m (2months from now) and the respective dates were these end. Given arbitrary contract dates (e.g. March 1-March28) I'm trying to find out where each date will fall within the contract months - and then what the price would be. So if we have 1m, we should look at the end date for 1m which is 31/01/2014. And the last date which was 3w from now or 21/01/2014. This falls mostly within the "January" contract, which has a price of 97.505.

It'll be much clearer once u open the spreadsheet.datewithin.xlsx