This is part of a school project I am doing.

I use Excel 2008 for mac and in the A column I have dates from 12/31/2010 going back to 1/3/1950 The starting point is 12/31/2010 In cell A2. In the B Column I have the closing price of the S&P 500 for the corresponding date in column A. I want to take the difference between the first and the last day of the quarter. E.g. B65-B2. I Don't want to go back and do it manually for 244 quarters though. How would I design a formula to find the closing price for the beginning of the quarter and then subtract it the closing price of the last day of the quarter? It's complicated because the dates are not exactly the same for each year. Any help would be much appreciated.