Sales rise, but Valspar swings to loss in Q4