Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Data sort is placing blanks at top
I have a list of formulas in cells A4:A53. The result of each formula will
be either a text description, or "blank" depending on the result of the IF statement contained within. The problem is, I have a macro that copies the 'values' of range A2:A50 into B4:B53, then tries to sort ascendingly. When I do this, all of the "blanks" appear at the top while the remaining text descriptions fall ascendingly below. I need the "blanks" to be at the bottom, but cannot figure out how to do this. FYI, when you look in the cells of the "blanks", there is an apostrophe to indicate left-alignment. I think this is causing the issue, but can't figure out what to do---I have tried formatting B2:B50 both as "general" and "text"---both end up with the same result. Here is the code I am using: Range("A4:A53").Select Selection.Copy Range("B4").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False With ActiveWorkbook.Worksheets("Custom").Sort .SetRange Range("B4:B53") .Header = xlNo .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Range("C1").Select Application.CutCopyMode = False |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HOW DO YOU SORT EXCEL FILE WITH BLANKS | Excel Worksheet Functions | |||
comparing two cols and placing blanks. | Excel Discussion (Misc queries) | |||
How do I sort a list that contains blanks that I want to keep? | Excel Discussion (Misc queries) | |||
Sort a row of strings, some containing blanks | Excel Programming | |||
Can I remove blanks from a range without using sort? | Excel Discussion (Misc queries) |