+ Reply to Thread
Results 1 to 2 of 2

Not sorting correctly

  1. #1
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    Not sorting correctly

    I have the filter on in my sheet and below is my code so far.

    For some reason that I cannot figure out, it is not sorting the column F to descending, it doesn't look like it's doing anything.




    HTML Code: 
    Dim LR As Integer
        Dim n As Integer
        
        LR = shData.Range("A65536").End(xlUp).Row
    
        shData.Activate
        
        shData.Range("A1:M" & LR).Select
        
        Range("A1:M" & LR).Sort Key1:=Range("M1"), Order1:=xlAscending, Header:= _
            xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
            DataOption1:=xlSortNormal

    I want the data to sort descending and then I will set n to the last row with data in column F, so that way I can set the row source of the listbox from n to LR and that should be all the empty fields in column f


    thanks for any help

  2. #2
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    I meant it is not sorting column M to descending order

    typo

    I meant it is not sorting column M to descending order

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1