Excel Merge Cells

  • Thread starter Thread starter luis.a.roman
  • Start date Start date
L

luis.a.roman

Is there anyway to find out if a particular cells is merged? I need to
unmerged cells in a spreadsheet where there could be merged or umerged
cells. How can I find out if a cells is merged?

Guidance welcome.
 
Here is a macro that may help,

Sub Found_Merged_Cells()
'will select the merged cell in a worksheet
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


--
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 2002 & 2003
 
If you want to unmerge all the cells that might be merged:

ActiveSheet.Cells.MergeCells = False

It won't hurt if there are no merged cells.

But it will unmerge all of them--is that what you wanted?
 

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