Results 1 to 4 of 4

Extract data between two dates

Threaded View

grey_hair Extract data between two dates 04-19-2011, 11:40 AM
NBVC Re: Extract data between two... 04-19-2011, 11:51 AM
grey_hair Re: Extract data between two... 04-20-2011, 11:24 PM
NBVC Re: Extract data between two... 04-21-2011, 10:25 AM
  1. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Extract data between two dates

    Assuming your start and end dates are in Sheet1, A2:B2, then in Sheet2, D2 add a helper column with formula:

    =IF(AND(A2>=Sheet2!$A$2,A2<=Sheet2!$B$2),COUNT(D$1:D1)+1,"")

    copied down. This indexes the matching items.

    in E2 enter:

    =MAX(D:D)

    this gives count of matches.

    Now in Sheet1, C2 enter:

    =IF(ROWS($A$1:$A1)>Sheet1!$E$2,"",INDEX(Sheet1!A:A,MATCH(ROWS($A$1:$A1),Sheet1!$D:$D)))

    copied down as far as you need and across the 3 columns.
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

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