You don't need any VBA for this. Excel has a feature called 'Conditionalformatting' which will do this for you. Excel Help covers the subjectpretty well.