Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort Orientation
Excel 2002, WinXP
I am sorting 27 columns and 156 rows with the following code: ..Range(.Cells(1, 1), .Cells(LastRow, LastCol)).Sort _ Key1:=.Range("C1"), _ Key2:=.Range("E1") This abbreviated code sorts in ascending order by default, which is what I want. The Key1 column, Column C, is all formulas with many of the formulas returning "blank" cells. My problem is that Excel is placing all of these "blank" cells at the top after sorting. I want them to be at the bottom. I have tried numerous variations of the variable parameters found in the long Sort command to no avail. Question: How do I code the Sort command to produce a sort in ascending order, top to bottom, with the "blank" cells at the bottom? I think I can do it with a Key1 helper column (Column #28) of =Len(Cx) in descending order with Key2 (C) and Key3 (E) in ascending order, but is there a better way? Thanks for your help. Otto |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pagesetup.Orientation need VBA routine to "Best Guess" Orientation | Excel Discussion (Misc queries) | |||
Page Orientation | Setting up and Configuration of Excel | |||
Comment orientation? | Excel Discussion (Misc queries) | |||
Page Orientation | Excel Discussion (Misc queries) | |||
Haunted Orientation | Excel Discussion (Misc queries) |