Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Blank rows appearing at top after sorting
I have an excel file with names in Column 'A' which starts with "MR " O
"MRS " as prefix. and I have the formula in B as follows. IF(A1="","",IF(LEFT(A1,3)="MR ",MID(A1,4,LEN(A1)-3),IF(LEFT(A1,4)="MR ",MID(A1,5,LEN(A1)-4),A1))) It works perfect and I am running the following macro to sort column B alphabeticaly but after sorting, the empty rows are apprearing at beginning. Ca anyone help me??????? Sub Macro4() Range("A1:B" & Range("B500").End(xlUp).Row).Select Selection.Sort Key1:=Range("b1"), Order1:=xlAscending, Header:=xlNo _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End Sub Thanks in advance G -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Blank rows appearing at top after sorting
I've given you a reply in your multi-post in .worksheet.functions
-- hth Max ----------------------------------------- Please reply in thread Use xdemechanik <atyahoo<dotcom for email -------------------------------------------------------- |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Blank rows appearing at top after sorting
Oops, correction. Should be:
I've given you a reply in your multi-post in .misc Rgds Max ----------------------------------------- Use xdemechanik <atyahoo<dotcom for email -------------------------------------------------------- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VALUE appearing (referencing blank cell) | Excel Worksheet Functions | |||
Sorting to Include Blank Rows | Excel Discussion (Misc queries) | |||
#REF appearing when cells,rows,cols are all protected | Excel Discussion (Misc queries) | |||
Excel adding blank rows when sorting | Excel Discussion (Misc queries) | |||
blank rows and sorting problem..plz help me... | Excel Discussion (Misc queries) |