Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort by Manager
Hi Guys, I am a beginner in VB. I have the following problem A B C Cust1 Manager1 Date Cust 2 Manager 2 Date Cust3 Manager1 Date ....... ........... ........ I want to sort the table by the Manager and then by the Date. Problem is that some rows are completly empy in the table. Thanks Guys ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort by Manager
The empty rows should sort to the bottom.
Turn on the macro recorder Select your data, Sort with the two criteria manually Turn off the macro recorder Look at the code recorded. That is the code you need. I get code like this: Selection.Sort Key1:=Range("B3"), Order1:=xlAscending, Key2:=Range("C3") _ , Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _ False, Orientation:=xlTopToBottom -- Regards, Tom Ogilvy "chrismania" wrote in message ... Hi Guys, I am a beginner in VB. I have the following problem A B C Cust1 Manager1 Date Cust 2 Manager 2 Date Cust3 Manager1 Date ...... ........... ........ I want to sort the table by the Manager and then by the Date. Problem is that some rows are completly empy in the table. Thanks Guys ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
add-in manager | Excel Worksheet Functions | |||
Scenario Manager | Excel Worksheet Functions | |||
Name Manager | Excel Discussion (Misc queries) | |||
add-in manager just for XLAs? | Excel Discussion (Misc queries) | |||
Scenario Manager | New Users to Excel |