+ Reply to Thread
Results 1 to 5 of 5

[VBA] Filtering Data from Excel worksheet

  1. #1
    Registered User
    Join Date
    12-26-2008
    Location
    Singapore
    Posts
    18

    [VBA] Filtering Data from Excel worksheet

    I have a excel data which is looking like the attachment image.

    I want to add one function into the userform which can let the user to select and filtering the date according the age. Referring to the attachment userfrom (Two options: 25 - 29 years old and 30 years old and above)

    Inside my data excel sheet, there are date of birth coloumn. Can anyone show me how should i write the command to filter according the age
    (P/S: The D.O.B Column was format as Date and i have attach the excel file as well)
    data.png
    dobform.png


    Thank you in advance
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: [VBA] Filtering Data from Excel worksheet

    I've posted an example if you do a Forum Search
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    12-26-2008
    Location
    Singapore
    Posts
    18

    Re: [VBA] Filtering Data from Excel worksheet

    Thank for your reply. What keywords should i search for?
    Can you give me the thread url?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: [VBA] Filtering Data from Excel worksheet


  5. #5
    Registered User
    Join Date
    12-26-2008
    Location
    Singapore
    Posts
    18

    Re: [VBA] Filtering Data from Excel worksheet

    Thank for your source. But i still don't know how to filtering the date

    I face one of the problem which i don't know how to write a function that can filtering the date. i have a column that recorded the Date of Birth of Client.
    I want to create a function that filter the client which is from 25 - 29 yrs old and 30 yrs old and above. I wish to create a userform which include the two option buttons (For 25-29yrs old and 30yrs old and above), after the user click a button of filtering, it will show the data either option1 or option2.

    The data look below!
    Name ContactNum D.O.B
    client1 34343452 12/01/1986
    client2 65748392 14/09/1970
    client3 98765647 18/11/1988
    client4 64738294 04/12/1965

+ 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