+ Reply to Thread
Results 1 to 5 of 5

FILTER function with a range as criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    04-29-2024
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    7

    FILTER function with a range as criteria

    I´m trying to use the filter function using a range of different criterias to match.

    I want Return Table 2 SKU ID for all cases where Article ID is a match with Article ID in Table 1.

    Using =Filter(Table2[SKU ID],Table2[Article ID]=Table1[Article ID]) just gives me an #N/A error. How can I do this?


    Data in table 1
    Article ID
    30704
    29116
    30703
    30702

    Data in Table 2
    SKU ID Product ID Article ID
    151208 10203 29116
    151209 10203 29116
    161192 10203 30702
    161193 10203 30703
    161194 10203 30704
    161195 10203 30705

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,998

    Re: FILTER function with a range as criteria

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

    I'll take a look when you've attached the workbook.

    Please take a moment to go back and thank your helpers in your last thread
    and mark it as solved (basic forum etiquette). Thanks.

    https://www.excelforum.com/excel-for...ficiently.html
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,998

    Re: FILTER function with a range as criteria

    You could give this a try:

    =FILTER(Table2[SKU ID],ISNUMBER(MATCH(Table2[Article ID],Table1[Article ID],0)))

  4. #4
    Registered User
    Join Date
    04-29-2024
    Location
    Sweden
    MS-Off Ver
    Office 365
    Posts
    7

    Re: FILTER function with a range as criteria

    Works like a charm! You are a star!

    Trick was to have the table2 first in the match section to make the ranges compared equally long. Thanks again!

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,998

    Re: FILTER function with a range as criteria

    You're welcome.

    Please now go back and sign off your first thread here (I linked to it above). Thanks.

    If you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

    Trick was to have the table2 first in the match section to make the ranges compared equally long.
    I don't think you've understood the solution, based on this comment. Ask if you need an explanation.

+ 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] Advanced Filter using Criteria Range not picking up all criteria
    By knykil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2021, 08:02 AM
  2. Advanced filter with function as criteria range?
    By dakke in forum Excel General
    Replies: 23
    Last Post: 06-10-2021, 04:48 PM
  3. [SOLVED] Advanced Filter Code : Criteria Range More Than 1 Row Breaks Filter
    By PaulGW in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2021, 04:30 PM
  4. [SOLVED] New filter function with multiple criteria
    By mikehk in forum Excel General
    Replies: 12
    Last Post: 04-14-2021, 06:46 PM
  5. Using a function to filter on two criteria
    By elouise_everett in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2017, 04:51 PM
  6. [SOLVED] Autofilter range criteria filter only last cell value in range
    By SAGAR KHOLLAM in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2013, 09:00 AM
  7. filter function with criteria
    By bklim in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-15-2007, 11:18 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