Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DrKilbert
 
Posts: n/a
Default 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   Report Post  
Gord Dibben
 
Posts: n/a
Default

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   Report Post  
DrKilbert
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I use word wrap in a merged cell in excel 2000? PartnersHC Excel Discussion (Misc queries) 4 October 18th 09 10:02 PM
excel tab key to move to right adjacent cell dwillie Excel Discussion (Misc queries) 2 January 26th 05 09:01 PM
I want to format a cell based on an adjacent cells value Cumbo Excel Discussion (Misc queries) 1 December 13th 04 12:52 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 08:16 PM
Merging Cells but have each cell counted in the range of merged c. gats13 Excel Worksheet Functions 2 November 9th 04 08:14 PM


All times are GMT +1. The time now is 10:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"