in reply to Conditional Formatting with Spreadsheet::WriteExcel

If you're going to use that global variable approach, then make sure that every rung of the if/elsif ladder has a set_color() call in it .. otherwise once you hit condition 2, everything after that will be red.