Not absolutely sure but I doubt very much that can be done by a simple macro recorded with the macro recorder, or by some formula. If it can be done, it would probably require some VBA (Visual Basic for Applications) coding to create a more complex macro.