Find a merged cell

J

Jimbob

Hi All
How can I programmatically find and select a single merged cell in a
spreadsheet. The sheet doesn’t have a continuous area but there is only one
merged cell in a variable row from A:N.

Many Thanks
 
G

Gary''s Student

Sub findmerge()
For Each r In ActiveSheet.UsedRange
If r.MergeCells = True Then
r.Select
Exit Sub
End If
Next
End Sub
 
J

Jimbob

Thanks - it works a treat and is much more elegant than my "creations".
You guys are so good and quick in responding. What a service.
 

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