+ Reply to Thread
Results 1 to 6 of 6

Filtering based on expiry date and other criteria

  1. #1
    Registered User
    Join Date
    01-14-2016
    Location
    manchester
    MS-Off Ver
    2013
    Posts
    7

    Filtering based on expiry date and other criteria

    Hi guys, im trying to filter data based on certain criteria and have this update manually and im not sure if it's even possible.

    What i have is a table with lots of customers in, customers are assigned a tier of 1 - 5 based on their size, the table has i field for eah customer with expiry date, no of days to expiry and number of months to expiry.

    what im trying to do is create a seperate tab that filters this mass of data into only displaying, tier 1 customers that expire in a year, tier 2 ustomers that expire in 6 months, tier 3 customers that expire in 3 months, then 2 months and 1 month. (you get the picture) the problem is i want this to update itself so i dont have to do it every day

    is this possible as im stumped with my limited knowedge and drawing a google blank.

    Thanks a lot.

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Filtering based on expiry date and other criteria

    See if this get you close. See attachment.
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    01-14-2016
    Location
    manchester
    MS-Off Ver
    2013
    Posts
    7

    Re: Filtering based on expiry date and other criteria

    thank you for this, i will have a play about with it monday!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Filtering based on expiry date and other criteria

    Here is a small table showing how you could do this with an ARRAY formula, no VBA needed.

    A
    B
    C
    D
    E
    F
    G
    1
    Name Tier Expire
    1
    2
    2
    aa
    1
    1
    Name Tier Expire
    3
    bb
    2
    2
    aa
    1
    1
    4
    cc
    3
    3
    5
    dd
    1
    4
    6
    ee
    2
    5
    7
    ff
    3
    6


    F1=tier level
    G1=expire months...you did not specify if you wanted to be that exact value, or <= that value, so I used =
    E3=IFERROR(INDEX(A:A,SMALL(IF(($B$2:$B$7=$F$1)*($C$2:$C$7<=$G$1),ROW($A$2:$A$7)),ROWS($A$1:A1))),"")
    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    then copied down and across
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    01-14-2016
    Location
    manchester
    MS-Off Ver
    2013
    Posts
    7

    Re: Filtering based on expiry date and other criteria

    thank you both for your replys, the vb stuff is a bit beyond me so i have read up a bit around if errors and arrays and i think this will be the way to go.

    sorry for not being completley clear but i'll have another go, i have a table that is populated by 816 different companies with infomration about the company going from column A to V

    A5:A821 is a list of the tier each company is in (1-5)
    F1:F821 is company name
    M1:M821 is the expiration date

    what i want is a new sheet (lets call it "upcoming renewals") that feeds off this table that looks at the A and M column

    so i want if A is tier 1 and M is within 365 days of today, display either the full row (A to V) in the upcoming renewals sheet (so i can filter it down to importand columns).
    if A is tier 2 and M is within 192 days from renewal display the A to V of that that company

    then tier 3 - within 90days
    tier 4 within 60 days
    tier 5 within 30 days

    it doesnt have to be the full row thats displayed as there are maybe 5 or 6 columns that are relevant but if possible its probably easier to display it all then filter it?

    I really appriciate the help guys, this place is awesome
    Last edited by nickyboy1981; 01-25-2016 at 07:57 AM.

  6. #6
    Registered User
    Join Date
    01-14-2016
    Location
    manchester
    MS-Off Ver
    2013
    Posts
    7

    Exclamation Re: Filtering based on expiry date and other criteria

    Hi guys, i am still struggling with this so in a last ditch attempt to save my sanity i have attached a sample, i basically want all the rows and
    data to show up on the urgent sheet when the criteria mentioned in my last post is met.

    If A5:a821 = Tier 1 and date in M is <= 1 year away, display the full row and data on the 'urgent' tab
    If A5:A821 = Tier 2 and date in M is <= 6 Months away, display the full row and data on the 'urgent' tab
    If A5:A821 = Tier 3 and date in M is <= 3 Months away, display the full row and data on the 'urgent' tab
    If A5:A821 = Tier 4 and date in M is <= 2 Months away, display the full row and data on the 'urgent' tab
    If A5:A821 = Tier 5 and date in M is <= 1 Months away, display the full row and data on the 'urgent' tab

    Ideally without VBA as my mind is already fried trying to get this to work

    i tried the array posted previousley but get getting function errors, theres a good chance i was doing something wrong though

    Thank you for any help.
    Attached Files Attached Files

+ 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] Change color of cells based on expiry date
    By DaGoose in forum Excel General
    Replies: 16
    Last Post: 03-07-2016, 03:10 PM
  2. Send email from Excel based on expiry date approaching
    By kordon in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-19-2015, 11:55 PM
  3. [SOLVED] Help with formula to return a value based on if that expiry date is within year
    By mw91 in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 01-08-2015, 11:37 AM
  4. autocalculate expiry date / expiry date colour warnings
    By kimbling1 in forum Excel General
    Replies: 8
    Last Post: 08-27-2014, 02:53 AM
  5. Replies: 0
    Last Post: 06-28-2014, 09:31 AM
  6. [SOLVED] Filtering Based on criteria
    By skate1991 in forum Excel General
    Replies: 18
    Last Post: 05-16-2013, 11:08 AM
  7. Replies: 1
    Last Post: 09-29-2012, 02:24 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