Few countries follow different quarter other than Q1 from Jan-Mar and Q2 for Apr-Jun.
In case of Jan-Mar as Q1, formula is simple (if cell A2 is date)
=ROUNDUP(MONTH(A2)/3,0)
This will give result as 1, 2, 3 & 4 for the quarters. If you want, you can concatenate "Q" in the formula to show Q1, Q2 etc as below
="Q"&ROUNDUP(MONTH(A2)/3,0)
If your financial / fiscal year starts in Apr, then for Jan-Mar, quarter is 4 whereas for Apr to Jun, quarter is 1 and so on. In this case, you can use following formula
=MOD(2+ROUNDUP(MONTH(A2)/3,0),4)+1
If your financial / fiscal year starts in Jun, then for Jan-Mar, quarter is 3 whereas for Jun to Aug, quarter is 1 and so on. In this case, you can use following formula
=MOD(1+ROUNDUP(MONTH(A2)/3,0),4)+1
If your financial / fiscal year starts in Oct, then for Jan-Mar, quarter is 2 whereas for Oct to Dec, quarter is 1 and so on. In this case, you can use following formula
=MOD(ROUNDUP(MONTH(A2)/3,0),4)+1