I have been trying to calculate the Quarter period but not for a year that starts on 01 Jan but for a date that denotes the end of year which could be 03-22 for example.

There are a lot of examples on how to do Q1, Q2 but none I can find or can develop which I have been trying to do for days now.

The input will be:

- Current Date
- Frequency (months)

3. Tax end (Month & Day)For the inputs

- Current Date > 2018-02-01
- Frequency (months) 3

3. Tax end (Month & Day)12-31Result

Current quarterstart=2018-01-01 end =2018-03-31

Last Quarterstart=2017-01-10 end =2017-31-12

The closest I can get is Google Spread Sheet which can be copied but it breaks down when it stretches over years.

The closest I have got is:

```
=DATE(YEAR(A5),FLOOR(MONTH(A5)-MONTH(G5),E5)+1,DAY(G5))
```

Where A5=current date G5=period in months. E5=Tax Filing date (I.e end period) + 1 would give you start period.

I just can't figure it out or even if it is possible in a formula.