+ Reply to Thread
Results 1 to 4 of 4

Sorting From Date and To Date

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    80

    Sorting From Date and To Date

    Hai Friends..

    In my attached file, I want to sort based on Date.. i.e From Date --- To Date.. Can anyone solve my problems please..

    Thanking You...
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Sorting From Date and To Date

    Select your table starting from row 2, apply autofilter and then for column A choose to custom filter:
    is greater than:
    from date
    and
    is less than
    to date

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.86 for Mac MS 365
    Posts
    8,528

    Re: Sorting From Date and To Date

    Looks sorted by date already unless you want time included into the sort. If so then use custom sort and by Date first, add level for time and smallest to largest.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,893

    Re: Sorting From Date and To Date

    Put this formula in H3 of Sheet1:

    =IF(AND(A3>=Sheet2!$D$1,A3<=Sheet2!$D$2),MAX(H$2:H2)+1,"-")

    and copy this down to the bottom of your data, or beyond if you want to allow for future expansion. Then put this formula in H7 of Sheet2:

    =IFERROR(MATCH(ROWS($1:1),'Sheet 1'!H:H,0),"-")

    Put this formula in A7 of Sheet2:

    =IF(OR($H7="",$H7="-"),"",INDEX('Sheet 1'!B:B,$H7))

    Copy this across to F7, then use the format painter to apply the same formats from B3:G3 of Sheet1 to A7:F7 of Sheet2. Then copy the formulae from row 7 down as far as you need them (e.g. to row 200). Then you can change the dates in D1 and/or D2 and the display will automatically adjust.

    Hope this helps.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sorting by date for an irregular date format
    By needhalp in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-14-2014, 04:20 PM
  2. Converting Text to Date & Sorting on Date
    By andresndor in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-10-2014, 04:48 PM
  3. Sorting data by date within a date range
    By 72mako in forum Excel General
    Replies: 6
    Last Post: 12-31-2009, 03:38 PM
  4. Date Sorting with key field as date and month only.
    By kvbalakumar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-13-2009, 03:02 AM
  5. 3 columns; date and two data, problem is sorting and calculating with respect to date
    By phosphorescence in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-29-2008, 04:21 PM

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