Hi
Clearcontents doesn't remove the formatting - the merged cells was removed specifically by the command
so any formatting would be untouched.
With the merged cells, you can either
1) remove the merging, delete the data and re-merge the cells or
2) include the full merged range in the command.
So if range A1:B2 was merged, and you wanted to remove the data from A1 without touching any of the formatting, you could use
So for the earlier code either
1) add new code to redo the merges to the cells or
2) enhance to include the merges cells ranges to the UNION command and remove the line to remove the merging.
rylo
Bookmarks