Consulting

Results 1 to 6 of 6

Thread: Trouble sorting as part of a Macro

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Trouble sorting as part of a Macro

    Hello, So I found some code that does the sorting that I want but when I try to run the Function as part of a macro the sorting does not work. Through a google search I found this code:

    Sub Sortmybin()
    Range("f2").CurrentRegion.Sort _
    Key1:=Range("f2").CurrentRegion.Sort _
    Order1:=XLDescending, _
    Header:=XLyes
    
    
    End Sub
    but I am getting a compile error for Expected end of Statement on the Order1 line.

    Any ideas?

    Thank you.
    Last edited by Bob Phillips; 10-27-2020 at 03:57 PM. Reason: Added code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •