How to write a macro to filter data in excel according to input box

Posted on 2014-08-07
Last Modified: 2014-08-08
I have data in excel that are imported from SQL. I would like to write a macro that allow the user to input a specific day and month in input box so the data which is already exist in excel will be filtered according to that day and month
Question by:Rawan Jambi
    1 Comment
    LVL 31

    Accepted Solution

    Filtering is a standard feature in Excel so why do you need to use a macro to run it.

    If the data already has AutoFilter enabled, there will be a dropdown at the top of each column. Select the drop down at the top of the date column and it should group the data by year, month and date so the user should be able to easily select the filtering required.

    Rob H

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
    This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
    The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
    This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now