+ Reply to Thread
Results 1 to 3 of 3

Determine if range of cells is already merged cells, all unmerged or combination

  1. #1
    Registered User
    Join Date
    05-25-2014
    Posts
    2

    Determine if range of cells is already merged cells, all unmerged or combination

    Hello,

    I'm relatively new to excel vba coding and I'm writing code to help with a planning/scheduling sheet. The user will highlight the cells he wants to merge (columns indicating hours of the day), and then uses a keyboard shortcut to initiate the macro. The macro needs to be able to determine whether the range of cells the user highlights contains all unmerged cells, is already a single merged cell or is a combination of merged and unmerged cells.

    I'm not sure how to do it, but I'm thinking of stepping through the range of cells one by one to see if it notices any cells which are merged or not; however, this seems quite memory intensive and slow. Does anyone have an easier way to do this?

    Regards,
    Mitch

  2. #2
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Determine if range of cells is already merged cells, all unmerged or combination

    This Code will check all of the selected cells.
    Please Login or Register  to view this content.
    If you want me to change it to check coloured cells then please give me more information in regard to the colour it will be shaded and any limit to the range that could be shaded (Checked)

    Thanks
    ARowbot

  3. #3
    Registered User
    Join Date
    05-25-2014
    Posts
    2

    Re: Determine if range of cells is already merged cells, all unmerged or combination

    Hi ARowbot,

    Thanks for your help. I was able to get something working using my original idea, but it isn't the most efficient. Here is is below:

    Please Login or Register  to view this content.
    I'll clean this up with some of your code.

    Thank you!

+ 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. Merged and unmerged cells sorting
    By RoxysMom in forum Excel General
    Replies: 3
    Last Post: 10-02-2014, 08:59 PM
  2. Worksheet table - mixing merged and unmerged cells
    By visicalcinator in forum Excel General
    Replies: 3
    Last Post: 01-14-2014, 08:44 PM
  3. [SOLVED] Merged and unmerged cells based on value in a cell
    By Rocky2013 in forum Excel General
    Replies: 2
    Last Post: 04-06-2013, 03:27 PM
  4. Replies: 2
    Last Post: 05-11-2012, 03:46 PM
  5. Copy Unmerged cells to Merged Cells
    By jnmturner in forum Excel General
    Replies: 4
    Last Post: 03-20-2008, 11:32 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