+ Reply to Thread
Results 1 to 4 of 4

Vba code to filter data excluding running year

  1. #1
    Registered User
    Join Date
    12-03-2014
    Location
    India
    MS-Off Ver
    MS-OFFICE 2010
    Posts
    15

    Vba code to filter data excluding running year

    hello frdzzzz...

    Hey i want a lil help.
    Actually i am trying to filter data but i don't want current year.

    can some1 help me with the code...

    plsss help..

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Vba code to filter data excluding running year

    Okay..
    As you haven't provided any worksheet to work with, so I make an example as you said.
    I have used advanced filter technique with Formula as Condition.
    Click the button it will list the non current year Dates.
    Here is the required code:-
    Please Login or Register  to view this content.
    Check the attached file:-
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Vba code to filter data excluding running year

    As Vikas said, you have not provided a sample workbook so hard to guess what exactly you are trying to achieve but see if this is the case.

    Assuming you have dates in column A and start from A2, then you can create a helper column with a formula =Year(A2) and then try the below code to filter the data as per your requirement.
    The below code also creates a helper column with the =Year() formula in col. AA.

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    12-03-2014
    Location
    India
    MS-Off Ver
    MS-OFFICE 2010
    Posts
    15

    Re: Vba code to filter data excluding running year

    Hey Guyzz thanks

    i regret for not to provide in detailed.

    thanks for your help

+ 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. Formatting a date, excluding the year
    By kylecampbellcore in forum Excel General
    Replies: 4
    Last Post: 08-21-2013, 01:21 PM
  2. Replies: 4
    Last Post: 07-16-2012, 07:02 AM
  3. Runtime Error 5 running code to set pivot filter to dropdown value
    By 4am in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2012, 11:34 AM
  4. Code the saves filter info to reapply after running other code
    By Wedge120 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-25-2011, 05:49 PM
  5. Replies: 4
    Last Post: 07-10-2010, 03:12 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