AND returns TRUE when all arguments are TRUE to trigger formattingISTEXT $ C 4 test comparison cell to make sure it has text and return TRUE , otherwise the formatting triggers for blank cells . RIGHT $ A 4 , 12 take the 12 rightside characters of the value in A 4 SUBSTITUTE $ C 4 , , remove any characters from comparison cell valueSEARCHRIGHT $ A 4 , 12 , SUBSTITUTE $ C 4 , , 1 search for the first value in the second value , return TRUE if it is not found at the beginning of the comparison cell value to trigger formatting . We do not want to match the value in the middle of the string by chance ! IFERROR formula , TRUE if the SEARCH does not make a match on the values it returns an error , we catch the error and return TRUE to trigger the format .