In the A column I have the date of the trading day from Jan. 3rd 1950 - present
A2 = 12/31/2010
A15350 = 1/3/1950
In the B column I have the closing value of the S&P 500 from Jan. 3rd 1950 - present
B2 = 1257.64
B15350 = 16.66
I want to design a formula to find the difference between the first and last trading day of each quarter. E.g. B65-B2

Not every quarter starts on the first of the month of the month and ends on the 30th or the 31st due to holidays.

I am getting stuck and any help would be greatly appreciated.