In my Google Spreadsheet I need to display the current quarter of the year for my analytics report.
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)))
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:
- for empty cellsFormula based on date in cell A10:
=IF(ISBLANK(A10),"-",CONCAT("Q", ROUNDUP(MONTH(A10)/3,0)))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With