+ Reply to Thread
Results 1 to 9 of 9

Filter Formula Based on Year

  1. #1
    Forum Contributor
    Join Date
    09-25-2018
    Location
    Grimsby, UK
    MS-Off Ver
    365
    Posts
    149

    Filter Formula Based on Year

    Hi,

    I have a filter formula with works great, it check the value of a cell and then populates a table based on the info in a data sheet (Sheet "Report Data")

    One issue I'm having is when the selection is "Year". I want it to look in the data sheet column H and return the row if the year is that selected in B12. It is import to note that the date isnt a year in the data sheet but a full date (dd/mm/yyyy) to address this is have tried the following

    Please Login or Register  to view this content.
    It hasn't worked.

    Below I will breakdown the cells and references

    Sheet "Report Data" is where the filter is getting the data from
    Sheet "Map" is where selections will be made
    Map B12 is where you select the year - Providing the year is what you are looking for (should out to AliGW for helping me with that)
    Map A14 has a working Filter formula but doesn't include the year option I'm looking for
    Map A15 has the formula I have tried.
    Report data Column H is where the date is, as I said this is a full date but I want it to look for the year in that date.


    I have attached the WB.

    Thanks for your time. My appreciation on things like this is huge.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Filter Formula Based on Year

    You have text in the column which is why you get the error, try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-25-2018
    Location
    Grimsby, UK
    MS-Off Ver
    365
    Posts
    149

    Re: Filter Formula Based on Year

    Thank You,

    Unfortunately that didn't work

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Filter Formula Based on Year

    In what way?

  5. #5
    Forum Contributor
    Join Date
    09-25-2018
    Location
    Grimsby, UK
    MS-Off Ver
    365
    Posts
    149

    Re: Filter Formula Based on Year

    Its says the syntax name isnt correct

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Filter Formula Based on Year

    Please try

    =FILTER(Table1,IFERROR(XLOOKUP(A12,Table1[#Headers],Table1,YEAR(Table1[Target Return to Service Date - No Delays]))=B12,0))
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    09-25-2018
    Location
    Grimsby, UK
    MS-Off Ver
    365
    Posts
    149

    Re: Filter Formula Based on Year

    Bo-Ry,

    That seems to work, I have changed it to the heading I wanted (Next Out-of-Service Inspection Due Date). I will now try and add it to the end of my working formula.

    Thank you

  8. #8
    Forum Contributor
    Join Date
    09-25-2018
    Location
    Grimsby, UK
    MS-Off Ver
    365
    Posts
    149

    Re: Filter Formula Based on Year

    It worked!!

    Thank you so very much.

    What community!!

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,741

    Re: Filter Formula Based on Year

    Its says the syntax name isnt correct
    That's because you have a space at the start of the "Next Out-of-Service Inspection Due Date" which causes problems.

+ 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. Cannot filter based on Year
    By KevinF1959 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2020, 02:41 PM
  2. [SOLVED] Need a Formula to sum the total based on year
    By Shan54321 in forum Excel General
    Replies: 10
    Last Post: 03-18-2019, 06:38 PM
  3. Formula to filter out the year based on a list of dates
    By hassanm in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-12-2017, 03:34 AM
  4. Pivot Filter not allowing filter by year, month and date
    By Steve aka Munky in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 02-17-2017, 11:47 AM
  5. [SOLVED] Pivot table - formula/format to filter by month and year
    By HeyInKy in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-17-2014, 01:54 PM
  6. Replies: 1
    Last Post: 07-09-2011, 03:02 AM

Tags for this Thread

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