+ Reply to Thread
Results 1 to 4 of 4

Error UnMerge Selection

  1. #1
    Registered User
    Join Date
    04-26-2016
    Location
    Minneapolis
    MS-Off Ver
    2013
    Posts
    21

    Error UnMerge Selection

    need assistance in the error message I am receiving

    Run-time error '13':
    Type mismatch


    I am trying to un-merge all of the selected cells. This does work aside getting the error.

    I am extremely new to VBA programming so its definitely ok to laugh at how simple this one might be.

    here is the code I am using

    Sub UN_Merge_Ranged()
    For Each c In Selection.UnMerge
    Next c
    End Sub

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,974

    Re: Error UnMerge Selection

    The command to use is ".MergeCells = False"
    Please Login or Register  to view this content.
    I think you'd be a bit faster with by just using this line without the For and Next:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-26-2016
    Location
    Minneapolis
    MS-Off Ver
    2013
    Posts
    21

    Re: Error UnMerge Selection

    Ha, I knew it would be easy, thanks so much.

    If you had any suggestions on books for VBA syntax or language and keywords, feel free to suggest


    Thanks again

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,974

    Re: Error UnMerge Selection


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mass unmerge
    By dewifarhana in forum Excel General
    Replies: 1
    Last Post: 11-03-2014, 11:52 PM
  2. Replies: 8
    Last Post: 04-11-2014, 12:01 PM
  3. vba to unmerge cells
    By Ironman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-31-2009, 10:25 AM
  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 so I can sort
    By PaulH7436 in forum Excel General
    Replies: 1
    Last Post: 02-23-2006, 10:35 AM
  7. Merge - Unmerge
    By Nosbor in forum Excel General
    Replies: 1
    Last Post: 02-03-2006, 08:49 AM

Tags for this Thread

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