A formula is possible (I am sure), but it will be tricky. Is VBA ok?