Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
add-in manager tleehh Excel Worksheet Functions 1 March 31st 09 11:54 PM
Scenario Manager Albie Excel Worksheet Functions 2 October 30th 08 10:46 PM
Name Manager F. Lawrence Kulchar Excel Discussion (Misc queries) 3 November 16th 06 07:28 PM
add-in manager just for XLAs? [email protected] Excel Discussion (Misc queries) 3 August 14th 06 01:24 PM
Scenario Manager Tony0z New Users to Excel 1 April 12th 06 02:34 AM


All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"