I think you'll need a macro to do this. I can't promise a solution but if you can attach a copy of your file (de-sensitize if necessary) . I'll have a look. Please include a detailed explanation of what you want to do using a few examples from your data and referring to specific cells, range and sheets.