Can't Sort Worksheet - Merged Cells Must be Identically Sized

G

Guest

A user has an Excel 2002 workbook that she needs to be
able to sort by a particular column. When she tries to
sort, she gets the message: "This operation requires the
merged cells to be identically sized." I don't see any
merged cells when I examine the worksheet. It doesn't
matter which column you try to sort by, you still get the
same error. I found MS KB article 291063, but the
solution that it provides (unmerge cells) doesn't help,
because there are no merged cells that I can find.
Looking for any help on this. Thanks.
 
D

Dave Peterson

Do a ctrl-A (to select all the cells on the worksheet)
Format|cells|alignment tab.

Look at the Merge cells box.
If it's got a grey check in there, you have merged cells somewhere in that
selection!

You can get rid of all of the merged cells by just unchecking that box. (But
you may screw up the formatting--so be careful.)

You could search the usedrange for merged cells (divide in half and look at that
format|Cells|alignment tab). Then divide each piece in half until you find it
(them???).

Or you could run a macro to help:

Option Explicit
Sub testme02()

Dim myCell As Range
Dim resp As Long

For Each myCell In ActiveSheet.UsedRange
If myCell.MergeCells = True Then
If myCell.Address = myCell.MergeArea.Cells(1, 1).Address Then
resp = MsgBox(Prompt:="found at: " _
& myCell.Address(0, 0) & " Of " _
& myCell.MergeArea.Address(0, 0), _
Title:="Continue Looking?", _
Buttons:=vbYesNo)
If resp = vbNo Then
Exit Sub
End If
End If
End If
Next myCell

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

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