Right! I did almost the same thing but in the USA Quarter 1 is Jan, Feb, & Mar. Q2 is Apr, May, & June. etc.Neat formula.
But I took Op's question to be like something below.
Q1 - Dec, Jan, Feb
Q2 - Mar, Apr, May
Q3 - Jun, Jul, Aug
Q4 - Sep, Oct, Nov
So if Date is between 6/1/2016 to 8/31/2016 then
Month 1 = 6
Month 2 = 7
Month 3 = 8
If date between 12/1/2015 to 2/29/2016 then
Month 1 = 12
Month 2 = 1
Month 3 = 2
Op can you clarify your requirement a bit? If your question isn't answered by one of the post above.