View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default 2-column sort macro

The macro looks sound and that approach certainly works.

Possibly you have a data problem.

Define messes up.

--
Regards,
Tom Ogilvy


"rmcveigh" wrote:


Hi again, you guys were so great at answering my last question that I
thought I'd pose another. (That, and I can't for the life of me figure
it out.)

A two-column sort obviously works when done manually, and I can even
record a working version as a macro- but as soon as you try to run it,
it messes up. Here's the code I'm using, please advise:

Range("A13:V19").Select
Selection.Sort Key1:=Range("V13"), Order1:=xlDescending,
Key2:=Range( _
"G13"), Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1,
MatchCase _
:=False, Orientation:=xlTopToBottom
End Sub


--
rmcveigh
------------------------------------------------------------------------
rmcveigh's Profile: http://www.excelforum.com/member.php...o&userid=37353
View this thread: http://www.excelforum.com/showthread...hreadid=572198