Finding Merged Cells

D

Dave Peterson

How about a little macro:

Option Explicit
Sub testme()

Dim myCell As Range
Dim resp As Long

For Each myCell In ActiveSheet.UsedRange.Cells
If myCell.MergeCells Then
If myCell.Address = myCell.MergeArea(1).Address Then
resp = MsgBox(prompt:="found: " _
& myCell.MergeArea.Address & vbLf & _
"Continue looking", Buttons:=vbYesNo)
If resp = vbNo Then
Exit Sub
End If
End If
End If
Next myCell

End Sub
 
M

melissa

I have a 27 different spreadsheets from 13 different locations that I combine
into 1 huge spreadsheet. I run different macros & manipulate it quite
extensivley. Until recently my 1st macro worked great, now it stops because
someone merged some cells.

I need to find the merged cells in the huge spreadsheet so I can get that
person to unmerge the cells prior to sending it it me so my macro will work.
I NEED TO FIND THE MERGED CELLS - NOT JUST UNMERGE - that I can do. I need
this location to fix, but I do not know what location it is.

How do I find the merged cells?

Thanks
Melissa
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top