+ Reply to Thread
Results 1 to 3 of 3

filter by year only in date column

  1. #1
    Registered User
    Join Date
    12-19-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    13

    filter by year only in date column

    I'm trying to figure out how to filter by the year only in a column where I have dates specified as dd/mm/year.

    This is being done through VBA and I tried the following (relevant code posted), but it doesn't seem to be working:

    Please Login or Register  to view this content.
    Any suggestions or help is appreciated.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,745

    Re: filter by year only in date column

    My VBA is poor, but if I was doing this without VBA, I would probably add a helper column abd extract the year, then filre on that?
    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

  3. #3
    Registered User
    Join Date
    12-19-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: filter by year only in date column

    Thanks for the suggestion. That would definitely work, but it forces me to either:
    1) have live formulas to extract the year in my workbook (not a fan of this because once the data gets large the file will be slow)
    or
    2) add the extra column and formula through code (I can delete the formulas via code after filtering is complete)

    I would go with option 2, but a part of me wants to believe there is an easier way with the autofilter. Wishful thinking perhaps...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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