title: How to get previous quarter (that occurs in the previous year) from Excel?
body: <p>I have the following formula which returns me the current quarter of the year. However, I would like to retrieve the quarter of a month, which happens to be from the previous year (2020) as we are currently only in Q1 of 2021.</p>
  <p>How do I express my results as <strong>Q1-21</strong> and <strong>Q4-20</strong> to give an indication of the year which the quarter falls under?</p>
  <p>My formula to retrieve the quarter from a given month is as follows:</p>
  <pre><code>=IF(AND(MONTH(C4)&gt;=4,MONTH(C4)&lt;7),&quot;Q2&quot;,IF(AND(MONTH(C4)&gt;=7,MONTH(C4)&lt;10),&quot;Q3&quot;,IF(AND(MONTH(C4)&gt;=10),&quot;Q4&quot;,IF(AND(MONTH(C4)&gt;=1,MONTH(C4)&lt;4),&quot;Q1&quot;))))
  </code></pre>
  <p><a href="https://i.stack.imgur.com/LkfA0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LkfA0.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/lzoLW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lzoLW.png" alt="enter image description here" /></a></p>
  <p>Kindly advice if you have any suggestion.
  Thanks in advance!</p>
  <p><strong>Regards</strong></p>