If cell A1 contains the date 2014-01-01 formatted as QQ and cell B1 contains the text 1st quarter, then the formula =IF(TEXT(A1,"QQ")=B1) returns TRUE. It even works if cell A1 has a different format.