+ Reply to Thread
Results 1 to 3 of 3

Adjacent cell belong to same merged cell?

  1. #1
    DrKilbert
    Guest

    Adjacent cell belong to same merged cell?

    How do I compare two adjacent cells to determine if they belong to the same
    merged cell?

  2. #2
    Gord Dibben
    Guest

    Re: Adjacent cell belong to same merged cell?

    Adjacent cells cannot be merged cells.

    If two or more cells are merged, they become one cell.

    That is what "merge" means.

    Perhaps there is another way to phrase the question?


    Gord Dibben Excel MVP


    On Fri, 25 Mar 2005 11:11:02 -0800, DrKilbert
    <[email protected]> wrote:

    >How do I compare two adjacent cells to determine if they belong to the same
    >merged cell?



  3. #3
    DrKilbert
    Guest

    Re: Adjacent cell belong to same merged cell?

    Thanks Gord for getting back to me on this.

    Let me explain in more detail. I have a worksheet that is setup as a grid,
    and I merge varying cells to represent various units of differing sizes /
    configurations. I have code that permits me to count the cells according to
    their background color. But it does just that, it counts each cell; i.e. A1
    and B1 belong to the same merged cell; A2 and B2 belong only to their own
    cell. When I run the counting code, it counts A1 and B1 as if they were
    individual cells and not the merged cell. So, in reality it does look at
    each cell individually regardless of being merged. I know I'm probably
    looking at this all wrong, except I know this is what is happening.
    Basically, you can reference merged cells A1:B1 by either A1, or B1. This
    being said, if there was a way of comparing cell A1 to cell B1 and know that
    they belonged to the same group of merged cells, I'd be able to flexibly map
    a preset grid according to however the cells may be merged and/or not merged
    .. This may be the long solution...

    The alternative may be something along the lines of:
    (Though I'm struggling on the syntax)

    For Each [merged cells] in [range]
    ...{counting process}...
    End For

    Having not gotten the code to function yet, my question with this method is;
    since A2 and B2 are not merged cells, are they included or not when counting
    merged cells elements?

    Thanks again for your time and thoughts on this...

    "Gord Dibben" wrote:

    > Adjacent cells cannot be merged cells.
    >
    > If two or more cells are merged, they become one cell.
    >
    > That is what "merge" means.
    >
    > Perhaps there is another way to phrase the question?
    >
    >
    > Gord Dibben Excel MVP
    >
    >
    > On Fri, 25 Mar 2005 11:11:02 -0800, DrKilbert
    > <[email protected]> wrote:
    >
    > >How do I compare two adjacent cells to determine if they belong to the same
    > >merged cell?

    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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