LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
prizm1
 
Posts: n/a
Default Sorting Area with Merged Cells

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

''''''''''''''''''''''''''''''''''''''''''''''''''
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Excel to treat merged cells as one cell when printing postitnote100 Excel Discussion (Misc queries) 1 June 24th 05 07:13 PM
I can't see the data (###) in a merged area? rakpak Excel Discussion (Misc queries) 3 June 21st 05 06:49 PM
Sorting referenced cells jcouncill New Users to Excel 2 December 21st 04 07:32 PM
paste info into merged cells Marc Setting up and Configuration of Excel 0 December 6th 04 09:09 PM
How do I "Wrap Text" & "Autofit" within Merged Cells in Excel? 6-shooter Excel Worksheet Functions 3 October 31st 04 12:14 AM


All times are GMT +1. The time now is 04:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"