View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Problems with sort

Ctrl+A and check whether there are any merge cells...and try the below code.

ActiveWorkbook.Sheets("MarginAnalysis").Range("b25 :b70"). _
Sort Key1:=Range("b25"), Order1:=xlDescending


If this post helps click Yes
---------------
Jacob Skaria


"bigjim" wrote:

The merged cells box is empty

"Jacob Skaria" wrote:

Right click the range and FormatCells--Alignment. Under 'Text Control' check
the status of 'MergeCells'
--
If this post helps click Yes
---------------
Jacob Skaria


"bigjim" wrote:

I'm using excel 2003. I want to sort data formatted as text in a column.
Most of the cells in the column are blank. I am using the following code:

With Sheets("MarginAnalysis")
.Cells.Sort Key1:=.Range("b225:B270"), _
Order1:=xlAscending, Header:=xlNo, _
MatchCase:=False, Orientation:=xlTopToBottom
End With

The error I get is "This operation requires the merged cells to be
identically sized. " There are no merged cells anywhere in the range
selected. When I go to the worksheet "marginanalysis" after the program
stops the range b225:b282 is highlighted.??
I'm lost and any help would be appreciated.

Jim