+ Reply to Thread
Results 1 to 3 of 3

Filter info by date parameters and populate listbox

  1. #1
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Filter info by date parameters and populate listbox

    Good Day,

    Hope this requests finds you well.

    I was hoping that someone can assist me with the code to use to determine from a list of project, which projects was not updated recently. For example, when I hit the search button, a list should be populated with the Project Manager, Project Name, and Last Updated info in a Listbox to be printed. There should be options to show, from today’s date, which projects haven’t been updated longer than 2weeks and 4 weeks ago. I hope it is making sense. I have attached an example file and a screen shot on the userform that I have in mind.

    I thank you in advance!

    Example.png
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-13-2014
    Location
    Best
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Filter info by date parameters and populate listbox

    Hi

    Try this:
    F1=NOW(), g1=2,h1=4
    F2:Fn= =IF((F$1-E2)>$G$1*7,IF((F$1-E2)>$H$1*7,$H$1*7,$G$1*7))
    results, 28, 14, false

    Based on this you can build your code.
    Need more help? Please reply asap.

    bart

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Filter info by date parameters and populate listbox

    To test click mcro button. Using an input box instead of a Userform since there was no userform included in your uploaded file.

    Marco starts by clearing Sheet2, activating Sheet1 and removing any autofilter. It then asks for number of days and one enters 14, 28 or any odd number. Using the Date value minus the number of days entered a new date is calculated.

    Then an autofilter is set on Sheet1 using the new date as the filter criteria. The filtered value is copied to Sheet2 and autofilter is removed from Sheet1.

    The macro also do an error checking if no value is added or user cliks "Cancel" or "X"

    Alf
    Attached Files Attached Files
    Last edited by Alf; 12-31-2014 at 09:51 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Filter worksheet data using 4 dependant comboboxes and populate in 'ListBox' on a userform
    By p_nayak268 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-27-2014, 12:41 PM
  2. Populate listbox with file names by date modified??
    By Nu2Java in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-09-2014, 11:23 PM
  3. [SOLVED] Listbox in userform to populate with all rows containing the Date today AND 2 weeks prior
    By cath1509 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-05-2013, 08:50 PM
  4. [SOLVED] Cmd to Listbox (Find info in sheet2) copy/paste info to A7 Excel 2007
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-14-2013, 09:49 AM
  5. Populate listbox with current date value
    By Khaos176 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2009, 12:27 PM

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