Results 1 to 5 of 5

Auto Sort problem

Threaded View

  1. #1
    Registered User
    Join Date
    10-09-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    20

    Auto Sort problem

    Hi all

    I have a fairly basic diary system set up. The data is sorted using the following code.(column D is a date)

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Target.Column = 4 Then
        With Range("A1:D" & Range("D65536").End(xlUp).Row)
            .Sort Key1:=Range("D2"), Order1:=xlAscending, Header:=xlGuess, _
            OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
        End With
        End If
    End Sub
    It works fine, until I want to clear one of the rows of data. It will sort but leaves the blank row at the top of the sheet. Which I dont want.Is the anyway for the sheet to sort including any blank fields so that the row containing the earliest date is at the top of the list?Any help greatfully accepted.Thanks John.
    Last edited by JohnRooney; 03-05-2010 at 11:31 AM. Reason: format wrong

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