HOW TO FIND THE MEREGED CELL

D

Don Guillett

Please do NOT use all caps in subject or body of posting

Option Explicit
Sub findmergedcells()
Dim c As Range
For Each c In Selection
If c.MergeCells Then
c.Select
MsgBox "here it is"
Exit For
End If
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
in message news:[email protected]...
 
G

Gary''s Student

Try this macro:

Sub findmerge()
For Each r In ActiveSheet.UsedRange
If r.MergeCells = True Then
MsgBox r.Address
End If
Next
End Sub
 
S

SVanDee

In Excel 2007, the normal Find command/dialog can search for cell formats;
e.g., merged cells. I just upgraded from Office97 to Office2007. I don't
believe there was an option to search for cell formats in Office97. I don't
know when it was added. This may not work if you have an older version than
Excel2007 but it's worth checking since it's such a useful capability to know
about:

- Type Ctrl/F to bring up the Find and Replace dialog box
or Find&Select | Find ... on the Home tab Ribbon in Excel 2007
or Edit | Find... in older versions of Excel
- Leave the Find What box empty
- Click the Format button at the far right of the top row of widgets
(If this button isn't there, I guess your version of Excel can't search for
formats.)
A drop-down list will appear
- Click Format ...
A Find Format dialog box will appear
- Click Alignment tab
- Click Merge cells until a green check mark appears in the box
- Click OK
The Find Format dialog box disappears
- Back in the find and Replace dialog box,
Click Find Next
Excel will move the active cell to the first merged cell on the sheet.
You can use Find All and/or Find Next to look for any others.

Cool. I didn't like Excel 2007 much for quite awhile. Thought seriously
about dropping back to 97. But it's growing on me.
 

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