Why does this not work? Is it because the first sheet does not have merged cells? If so, how do I check to see that the sheet does not have any merged cells?
I get "application-defined or object-defined error"![]()
Function CleanBook() Dim sh As Worksheet For Each sh In ActiveWorkbook.Sheets sh.Cells.UnMerge sh.Name = Trim(sh.Name) Next sh End Function
Bookmarks