View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Merged Cells: Any way to backtrack?

Chip,

Why not just

Sub AAA()
Debug.print Range("A3").MergeArea.Address
End Sub

Just curious.

--
Regards,
Tom Ogilvy


"Chip Pearson" wrote in message
...
Pete,

You could try something like the following:

Sub AAA()
Dim MergeCell As Range
Dim OrigCells As Range
Set MergeCell = Range("A3")
With MergeCell.MergeArea
Set OrigCells = .Resize(.Rows.Count, .Columns.Count)
End With
Debug.Print OrigCells.Address
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email on the web site)

"(PeteCresswell)" wrote in message
...
If somebody sends me a worksheet that contains merged cells, Is there any
way
for me to programmatically determine what the original component cells
were?
--
PeteCresswell