Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to extract all records between two dates in Excel?

Here is a range of data in Excel, and in this case, I want to extract all rows records between two dates as below screenshot shown, have you any ideas to quickly handle this job without looking for data and extracting them one by one manually?

doc extract record between dates 1 shot arrow right doc extract record between dates 2

Extract all records between two dates by formulas

Extract all records between two dates by Kutools for Excelgood idea3

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words...
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum...
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns...
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Create Mailing List and Send Emails by Cell's Value...
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

Extract all records between two dates by formulas


To extract all records between two dates in Excel, you need to do as these:

1. Create a new sheet, Sheet2, and type the start date and end date in two cells, for instance, A1 and B1. See screenshot:
doc extract record between dates 3

2. In the C1 in Sheet2, type this formula, =SUMPRODUCT((Sheet1!$A$2:$A$22>=A2)*(Sheet1!$A$2:$A$22<=B2)), press Enter key to count the total number of matching rows. See screenshot:
doc extract record between dates 4

Note: in the formula, Sheet1 is the sheet contains the original data you want to extract from, $A$2:$A$22 is the range of data, A2 and B2 are the start date and end date.

3. Select a blank cell that you will place the extracted data, type this formula =IF(ROWS(A$5:A5)>$C$2,"",INDEX(Sheet1!A$2:A$22,SMALL(IF((Sheet1!$A$2:$A$22>=$A$2)*(Sheet1!$A$2:$A$22<=$B$2),ROW(Sheet1!A$2:A$22)-ROW(Sheet1!$A$2)+1),ROWS(A$5:A5)))), press Shift + Ctrl + Enter keys, and drag Auto fill handle over columns and rows to extract all data until blank cells or zero values appear. See screenshot:
doc extract record between dates 5

4. Remove the zeros, and select the dates showing as 5-digit numbers, go to Home tab, and select Short Date in the General drop-down list to format them in date formatting. See screenshot:
doc extract record between dates 6


Extract all records between two dates by Kutools for Excel

If you want to more easily handle this job, you can have a try on the Select Specific Cells feature of Kutools for Excel.

Kutools for Excel, with more than 120 handy functions, makes your jobs easier. 

After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)

1. Select the data you want to extract from, click Kutools > Select > Select Specific Cells. See screenshot:
doc extract record between dates 7

2. In the Select Specific Cells dialog, check Entire row option, and select Greater than and Less than from the drop-down lists, type the start date and end date into the text boxes, remember to check And. See screenshot:
doc extract record between dates 8

3. Click Ok > OK. And the rows matched the dates have been selected. Press Ctrl + C to copy the rows, and select a blank cell and press Ctrl + V to paste it, see screenshot:
doc extract record between dates 9


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Neha · 22 days ago
    "drag Auto fill handle over columns and rows to extract all data until blank cells or zero values appear."
    This doesn't seem to be working for me. The first row gives me the dates but the same gets repeated in the next two rows.
  • To post as a guest, your comment is unpublished.
    Muneera · 3 months ago
    it worked well for single sheet. can u pls help me to get the same from multiple sheets of similar data. first 4 sheets contain similar data. i need all records of same 'date' in sheet5.
  • To post as a guest, your comment is unpublished.
    Tim · 3 months ago
    Can you extend the formula to check for dates that encompass more than one day? For example, using the same start and end dates from 1/1/15-12/31/16, but the data in sheet 1 have start and end dates too rather than just existing for a singular date.
  • To post as a guest, your comment is unpublished.
    Angry Savage · 9 months ago
    This formula worked brilliantly. I was concerned as I have multiple date duplicates and there was no mention of how it handles those; no issues. It returned all relevant data.
    Stoked.
    • To post as a guest, your comment is unpublished.
      Sunny · 8 months ago
      Thanks for your support, you can combined the duplicate dates cells after extracting.
  • To post as a guest, your comment is unpublished.
    Math · 1 years ago
    The trouble I am having because I need to find dates that run through the date range specified. So I want anything that runs through something like 1/2016 to 12/2017, however it needs to include start dates that may be before the range so I can identify the records I need to look at.
  • To post as a guest, your comment is unpublished.
    Kayla · 1 years ago
    I used this code and it is pulling up dates outside of the window... how do I fix it?
    • To post as a guest, your comment is unpublished.
      Sunny · 8 months ago
      Which code Kayla? Do you mean the formula?
  • To post as a guest, your comment is unpublished.
    Michelle · 1 years ago
    I recreated this example in Excel 2010, and the result was that the first row of data would show up, but everything underneath had a number error.
    • To post as a guest, your comment is unpublished.
      Brian · 10 months ago
      Same thing happens to me n Excel 2010. Something in the formula doesn't work correctly.
    • To post as a guest, your comment is unpublished.
      Sunny · 1 years ago
      Have you pressed Shift + Ctrl + Enter keys?
      • To post as a guest, your comment is unpublished.
        brian · 10 months ago
        I see what's wrong. You have to press the shift + CTRL + Enter keys while still in edit mode.
        I was hitting those keys after entering the formula and hitting ENTER.
        I wish it would have been clearer.
        • To post as a guest, your comment is unpublished.
          Sunny · 8 months ago
          Yes, brian, after typing the formula and still in edit mode, directly press Shift + Ctrl + Enter keys (the keys instead of Enter key), to get the correct result.
          • To post as a guest, your comment is unpublished.
            Jo Higgins · 5 months ago
            Still doesnt work for me? I am doing exactly as above and still returning the NUM error? Any other ideas?