Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 55
Default Cells are Merged. How to know where to where???

Hi,
i have a merged cells say (a1 to b5). Now i am trying to know,

1) whether the cell is merged or not
2) if merged, where to where, from which cell to which cell

Your help will highly be appreciated.

Huge Thanks

musa.biralo

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 380
Default Cells are Merged. How to know where to where???

Dim cell As Range
Dim coll As Collection
Dim collItem


Set coll = New Collection
For Each cell In Range("A1:B5")
On Error Resume Next
If cell.MergeCells Then
coll.Add cell.MergeArea.Address(False, False), _
cell.MergeArea.Address(False, False)
End If
On Error GoTo 0
Next cell

For Each collItem In coll
MsgBox collItem
Next collItem


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"musa.biralo" wrote in message
oups.com...
Hi,
i have a merged cells say (a1 to b5). Now i am trying to know,

1) whether the cell is merged or not
2) if merged, where to where, from which cell to which cell

Your help will highly be appreciated.

Huge Thanks

musa.biralo



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 55
Default Cells are Merged. How to know where to where???

Hey Bob,

Thank so much...this is more than what i was expecting....Great Help.

Thanks again
musa.biralo


Bob Phillips wrote:
Dim cell As Range
Dim coll As Collection
Dim collItem


Set coll = New Collection
For Each cell In Range("A1:B5")
On Error Resume Next
If cell.MergeCells Then
coll.Add cell.MergeArea.Address(False, False), _
cell.MergeArea.Address(False, False)
End If
On Error GoTo 0
Next cell

For Each collItem In coll
MsgBox collItem
Next collItem


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"musa.biralo" wrote in message
oups.com...
Hi,
i have a merged cells say (a1 to b5). Now i am trying to know,

1) whether the cell is merged or not
2) if merged, where to where, from which cell to which cell

Your help will highly be appreciated.

Huge Thanks

musa.biralo


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 to copy single cell into cell that is merged from two cells? Rod Excel Discussion (Misc queries) 3 January 22nd 06 09:24 PM
Linking Merged Cells C. Cunningham Excel Worksheet Functions 2 December 27th 05 09:45 PM
merged cells into one text cell, size varies dependant on text dat Jazzylady825 Excel Discussion (Misc queries) 0 December 9th 05 08:26 PM
requires that merged cells must be identically sized? Catt Excel Discussion (Misc queries) 11 July 3rd 05 12:36 PM
paste special | values should work with merged cells PastingSpecial Excel Discussion (Misc queries) 1 June 20th 05 06:51 PM


All times are GMT +1. The time now is 03:10 PM.

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"