Results 1 to 13 of 13

Unmerge All Cells

Threaded View

  1. #1
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Unmerge All Cells

    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?
    Function CleanBook()
    Dim sh As Worksheet
    
    For Each sh In ActiveWorkbook.Sheets
        sh.Cells.UnMerge
        sh.Name = Trim(sh.Name)
    Next sh
    End Function
    I get "application-defined or object-defined error"
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 03-17-2015, 09:47 AM
  2. vba to unmerge cells
    By Ironman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-31-2009, 10:25 AM
  3. unmerge cells
    By Susanstef in forum Excel General
    Replies: 6
    Last Post: 06-26-2006, 10:13 PM
  4. [SOLVED] How do you unmerge cells
    By Freddo in forum Excel General
    Replies: 1
    Last Post: 06-07-2006, 12:10 PM
  5. [SOLVED] Unmerge to all cells possible?
    By Dan von InfoPath in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2006, 05:10 PM
  6. unmerge cells
    By Brian Matlack in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2006, 07:10 PM
  7. How do you unmerge cells?
    By Pank Mehta in forum Excel General
    Replies: 1
    Last Post: 02-01-2005, 11:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1