+ Reply to Thread
Results 1 to 2 of 2

Find Birthday of persons which falls between the given two dates

  1. #1
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Smile Find Birthday of persons which falls between the given two dates

    Dear Friends,

    I need to find out date of birth of persons in my list, which falls within the given dates. For Example:

    in ColD, I have Names & in ColH, I have Date of Birth of the concerned name.
    The worksheet have around 3,500 data. Now, I just need to find who are all having the Birthday between the given dates. i.e. in ColP5 (Find DoB from), and ColQ5 (Find DoB to) - two dates are given. We need to find out the names & birthdays falls between these days and it should be shown in the next sheet.

    I have attached a sample workbook for your kind reference.

    Thanks a lot in advance,

    acsishere.
    Attached Files Attached Files
    Last edited by acsishere; 10-31-2008 at 10:39 AM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Extract birthdays within a range

    Since you posted in the Programming forum, I attached a vba solution.
    NOTE: that file DOES contain macros, but they do NOT auto-execute.

    Here's the explanation of how it works:
    Assumptions:
    The DATA sheet contains your data in cells A1:H30.
    The BIRTHDAYS sheet is where you want the extracted data to be displayed

    Using the BIRTHDAYS sheet:
    <Insert><Name><Define>
    Names in workbook: BIRTHDAYS!Database
    Refers to: =Data!$A$1:$H$30

    Using the BIRTHDAYS sheet:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Still using the BIRTHDAYS sheet:
    Please Login or Register  to view this content.
    (Notice: you are on BIRTHDAYS, and creating a Sheet-level range name, but
    the referenced range is on the DATA)

    The reason: An advanced filter cannot SEND data to another sheet, but
    it can PULL data from another sheet.


    Now...set up the Advanced Data Filter:
    <Data><Filter><Advanced Filter>
    Select: Copy to another location
    List Range: (press F3 and select Database)
    Criteria Range: (press F3 and select Criteria)
    Copy To: (press F3 and select Extract)
    Click [OK]

    Note: if you want to run that Advanced Data Filter repeatedly,
    you'll need to re-select Database each time
    ....OR...if you're feeling a bit ambitious...

    You can build a simple macro to automatically re-run the filter:
    Press [Alt]+[F11] to open the VBA editor
    Right click on the VBA Project folder for your workbook
    Select: Insert>Module

    Then, copy/paste this code into that module:

    Please Login or Register  to view this content.
    To run the code....just click the [Click to pull matching data] button
    OR
    <Tools><Macro><Macros> (or press [Alt]+[F8])
    Select and run: PullMatchingData

    In the attached workbookTo test, change the criteria values and run it again.

    Is that something you can work with?
    Attached Files Attached Files
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

+ 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