Sorry, that was my misunderstanding... try formula:
=IF(COUNT(Sheet1!B2:E2),"YELLOW",IF(ISNUMBER(MATCH("Problem",Sheet1!B2:E2,0)),"RED",IF(ISNUMBER(Sheet1!F2),"BLUE","WHITE")))
copied down