Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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 wrote: How do I compare two adjacent cells to determine if they belong to the same merged cell? |
#3
|
|||
|
|||
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 wrote: How do I compare two adjacent cells to determine if they belong to the same merged cell? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I use word wrap in a merged cell in excel 2000? | Excel Discussion (Misc queries) | |||
excel tab key to move to right adjacent cell | Excel Discussion (Misc queries) | |||
I want to format a cell based on an adjacent cells value | Excel Discussion (Misc queries) | |||
GET.CELL | Excel Worksheet Functions | |||
Merging Cells but have each cell counted in the range of merged c. | Excel Worksheet Functions |