Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2006

Tip: Looking for answers? Try searching our database.

Cells are Merged. How to know where to where???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
musa.biralo - 05 Nov 2006 16:13 GMT
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
Bob Phillips - 05 Nov 2006 16:27 GMT
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)

> Hi,
> i have a merged cells say (a1 to b5). Now i am trying to know,
[quoted text clipped - 7 lines]
>
> musa.biralo
musa.biralo - 05 Nov 2006 17:17 GMT
Hey Bob,

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

Thanks again
musa.biralo

> Dim cell As Range
> Dim coll As Collection
[quoted text clipped - 33 lines]
> >
> > musa.biralo

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.