Find Merge Cells

  • Thread starter Thread starter DeniseS
  • Start date Start date
D

DeniseS

Is there a quick way through an excel workbook that you
can find all Merged Cells??

I have been using the GoTo function for blank but am
wondering if there is an easier way.

Thank You.
 
Denise, here is a macro by Dave Peterson

Sub Found_Merged_Cells()
'macro looks for merged cells
'By Dave Peterson
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

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
.... and here's another macro.
This one sets the selection to the merged cells, then you can use the Tab or
Enter key to move through the list.

Sub fmc()
Dim mc As Range
For Each cell In ActiveSheet.UsedRange.Cells
If cell.MergeCells Then
If mc Is Nothing Then
Set mc = cell
Else
Set mc = Union(mc, cell)
End If
End If
Next
mc.Select
End Sub
 

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

Back
Top