+ Reply to Thread
Results 1 to 6 of 6

Extracting data from Merged Cells

  1. #1
    Registered User
    Join Date
    07-24-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    13

    Extracting data from Merged Cells

    Need help writing a macro for extracting data from merged cells.

    I have an Excel file with multiple tabs. Each tab has the exact same layout. Some cells with data are merged. I would like to run a macro that will go through all the tabs and unmerge the cells but keep the cell data originally there.
    I've attached an example of the file.
    I appreciate any help!
    Thank you! test_unmerge.xls

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Extracting data from Merged Cells

    If you select the entire sheet and click unmerge, the data in each group of merged cells will be moved to the first cell of that range after the unmerge event.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    07-24-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Extracting data from Merged Cells

    Ah, that was simple enough. Thank you. Would it be possible to create a macro that will run this command on all worksheets as soon as a user open up this workbook? Or, if it is better to create a button a user can press once in the workbook, which will run the macro.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Extracting data from Merged Cells

    Hy zloywolf

    Try this
    Please Login or Register  to view this content.
    Place the code in ThisWorkbook Module.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Registered User
    Join Date
    07-24-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Extracting data from Merged Cells

    Thank you! It worked perfectly.

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Extracting data from Merged Cells

    You're welcome. If that satisfies your need please mark your Thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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