Thanks for the response. I have copied this into my macro, but I am now getting an error message that says: "This command requires at least two rows of source data. You cannot use this command on a selection in only one row." Can you help me resolve this? Thanks for your help