how can I find merged cells in a large xl-file

G

Guest

I received a large xl-file, in which I want to execute some sorting
operations. However, I get the error message that "this operation requires
the merged cells to be identically sized". I guess some cells are merged, but
does anybody know how I can quickly find the merged cells?
 
A

Ardus Petus

Sub showMerged()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange.Cells
If cell.MergeCells Then
MsgBox "cell " & cell.Address & vbLf & _
"Merge area: " & cell.MergeArea.Address
End If
Next cell
End Sub

HTH
 
G

Guest

the simple way is:
- select all cells of the table which you want to sort data;
- click menu Format \ Cell, and unchecked the Merge cell in Alignment tab

now you can use sorting function ok
 
G

Guest

thanx

Ardus Petus said:
Sub showMerged()
Dim cell As Range
For Each cell In ActiveSheet.UsedRange.Cells
If cell.MergeCells Then
MsgBox "cell " & cell.Address & vbLf & _
"Merge area: " & cell.MergeArea.Address
End If
Next cell
End Sub

HTH
 
G

Guest

thanx

hai6734 said:
the simple way is:
- select all cells of the table which you want to sort data;
- click menu Format \ Cell, and unchecked the Merge cell in Alignment tab

now you can use sorting function ok
 
G

Guest

IThank You! i knew there had to be a select all option yet couldn't figure it
out. This has solved many times of turmoil.
Vivian H.
 

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