Yearly quarters formula

You could try this (add your reference cell with date or a date to the place I've pointed with **)

=ROUNDUP(MONTH(*reference or date*)/3;0)

Tl;dr

Blank cells resolve to - instead of 4 :

=IF(ISBLANK(A10),"-",CONCAT("Q", ROUNDUP(MONTH(A10)/3,0)))

Note: for locale using ; as separator (E.g. France, Italy, more details):

=IF(ISBLANK(A10);"-";CONCAT("Q"; ROUNDUP(MONTH(A10)/3;0)))

Detailed answer

Building on Han Soalone's answer: if the cell is blank, it will return 4 as a blank (= empty) cell defaults to December 30, 1899 (source)

I suggest using ISBLANK to test first if the cell is empty, then CONCAT the letter Q to the quarter number to obtain:

  • Q1,
  • Q2,
  • Q3,
  • Q4,
  • - for empty cells

Formula based on date in cell A10:

=IF(ISBLANK(A10),"-",CONCAT("Q", ROUNDUP(MONTH(A10)/3,0)))