+ Reply to Thread
Results 1 to 5 of 5

How do I extract Expired Date Contracts to another Worksheet using VBA?

  1. #1
    Registered User
    Join Date
    07-17-2018
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 2010
    Posts
    3

    Question How do I extract Expired Date Contracts to another Worksheet using VBA?

    Hi there this is my first time joining this forum.

    I would like to ask about how do I extract Customer's Expired date contract and contracts that are about to be expired in 30 days into separate worksheets. I tried using the Autofilter VBA with something like "Value < Date" but it doesn't seem to work... are there any other ways to extract the expiry dates and contracts that are about to be expired within 30 days?

    I have attached a sample below.

    Any help is appreciated thank you.
    Attached Files Attached Files
    Last edited by Faust0507; 07-17-2018 at 11:32 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How do I extract Expired Date Contracts to another Worksheet using VBA?

    This is a job for pivot tables:

    First, convert your data range into an Excel Table. This isn't absolutely necessary, but tables have a lot of benefits: http://www.utteraccess.com/wiki/Tables_in_Excel.

    Then add a helper column with the formula: (I cannot include the formula since it looks like HTML code and is blocked by the browser - see the spreadsheet.

    I can't recall if Excel 2010 allows slicers to control Excel Tables, but if it does, we could stop here. In fact, you can use the filter on this column to get the result you want. Slicers just look better.

    Or you can press on and develop a pivot table using the expired filed as a filter.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    07-17-2018
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 2010
    Posts
    3

    Re: How do I extract Expired Date Contracts to another Worksheet using VBA?

    Ah I see, this works though I suppose and yes, slicers does work in Excel Tables for me.
    Thank you very much ^^

    Just another question though, are there any other ways for me to use VBA to filter out the dates? I heard before something like cdate or cdbl or something but I don't really know how to use it

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: How do I extract Expired Date Contracts to another Worksheet using VBA?

    Do you mean?
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-17-2018
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 2010
    Posts
    3

    Re: How do I extract Expired Date Contracts to another Worksheet using VBA?

    Yes this is it, thank you very much, both of you ^^

+ 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. How to extract data from another worksheet based on Start Date, End Date
    By xBadBoi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2016, 03:20 PM
  2. Delete Row if the Date has Expired
    By jsolder in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-23-2012, 11:16 AM
  3. msg box to display if date expired
    By baz0912 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2008, 12:26 PM
  4. [SOLVED] Date Function:contracts expire.
    By LisaS in forum Excel General
    Replies: 1
    Last Post: 07-27-2005, 04:05 PM
  5. [SOLVED] Expired Date Formula
    By Donna in Elkin, NC in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2005, 01:06 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