It's all done with Data Validation dropdowns and formulas. The flags are simply inserted onto the worksheet and then carefully positioned.