That is a reason why not merge cells, it almost always causes problems down
the road
The only reason cells get merged is for appearance, however you can have
similar layout without using merge.
For instance instead of merging cells A1 and B1 you can select both cells,
do formatcellsalignment
then select center across selection
--
Regards,
Peo Sjoblom
(No private emails please)
"prizm1" wrote in message
...
In the area A23:G30, each row contains merged cells of column B, C, D, E
and F apart from each other row in the area. I get a "This operation
requires that merged cells to be identically sized" error when running
this macro. Even using the Data/Sort from the File menu gives me this
error.
How would I sort an area containing rows with merged cells? Also, the
cells must remain (or return to being) merged after this operation.
I appreciate the previous help concerning clearing the contents from
merged cells using ActiveCell relative references. Unfortunately, my
email/newsgroup client, for whatever reason, will not display that
previously posted newsgroup thread, so I must start another. Will fix.
Also, the Header parameter line is not broken in my code but just displays
that way in this message formatting.
'''''''''''''''''''''''''''''''''''''''''''''''''' '
Sub SortData()
Application.ScreenUpdating = False
Range("A23:G30").Select
Selection.Sort _
Key1:=Range("A23"), Order1:=xlAscending, _
Key2:=Range("F23"), Order2:=xlAscending, _
Header:=No, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
ActiveCell.Select
Application.ScreenUpdating = True
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''
|