my fault for not clarifying, it's the code itself I need. I don't know how to code this in excel. I can record a macro but it acts like a drone, doing the same thing over and over again, regardless of the cell contents.