+ Reply to Thread
Results 1 to 6 of 6

FILTER or XLOOKUP? One criteria in multiple locations; possible multiple results listed

  1. #1
    Forum Contributor
    Join Date
    04-03-2009
    Location
    Anchorage, Alaska, USA
    MS-Off Ver
    Office 365
    Posts
    113

    FILTER or XLOOKUP? One criteria in multiple locations; possible multiple results listed

    Hi,

    I think I'm to the point of brainfarting for the time being, so I'm sorry if this has been asked before. I feel like I'm not grasping the answers I'm researching, so I'll just ask directly:

    Screenshot 2021-08-12 112505.jpg

    This is a mock up of what I want. While you look at it, How do I search for one criteria that could be in multiple columns (in this case multiple Action columns), and return the all results? In real life this may be one result or five results. Basically it's a who shares this criteria? question, which is easy enough when the criteria is in one column: FILTER. But multiple columns? Many of the answers I see are how to display results using select columns by using a FILTER-wrap, like

    Please Login or Register  to view this content.
    I'm not finding how to search multiple, possibly non-adjacent columns for criteria. And maybe I need to use XLOOKUP instead, but I think that returns only one result, not many.

    Like I said I'm brainfarting, so maybe I'm staring the answer in the face without seeing it.

    The mock up spreadsheet is attached.

    Thank you.

    PS: I could go the macro route, but I'm exploring formulas first. Thanks.
    Attached Files Attached Files
    Last edited by akedm; 08-12-2021 at 03:51 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    491

    Re: FILTER or XLOOKUP? One criteria in multiple locations; possible multiple results list

    Is "Action" per "Plan" unique?
    That is, could Tempe, New York and Albancy each have "Shop" as "Action"?

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

    Re: FILTER or XLOOKUP? One criteria in multiple locations; possible multiple results list

    On possibility
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You might also want to update your profile, as your obviously not running 2013 anymore.

  4. #4
    Forum Contributor
    Join Date
    04-03-2009
    Location
    Anchorage, Alaska, USA
    MS-Off Ver
    Office 365
    Posts
    113

    Re: FILTER or XLOOKUP? One criteria in multiple locations; possible multiple results list

    Is "Action" per "Plan" unique?
    That is, could Tempe, New York and Albancy each have "Shop" as "Action"?
    Action per plan is not unique. Example Plan A: I could "Shop" in Tempe, New York and Albany.

  5. #5
    Forum Contributor
    Join Date
    04-03-2009
    Location
    Anchorage, Alaska, USA
    MS-Off Ver
    Office 365
    Posts
    113

    Re: FILTER or XLOOKUP? One criteria in multiple locations; possible multiple results list

    =LET(rng,B2:G5,rws,ROWS(rng),cols,2,seq,SEQUENCE(rws*COLUMNS(rng)/cols,,0),a,INDEX(A2:A5,MOD(seq,rws)+1),b,INDEX(rng,MOD(seq,rws)+1,INT(seq/rws)*cols+SEQUENCE(,cols)),FILTER(CHOOSE({1,2,3},a,INDEX(b,,1),INDEX(b,,2)),INDEX(b,,2)=A8))
    Wow!

    This works...by magic, I imagine.
    I'll see if I can decipher it.

    UPDATE: Ok - so LET formula is new to me. But now that I'm reading about it, it reminds me of those one-line programs that Beagle Brothers used to issue for the Apple IIe computers way back when - all the variables, formulas and functions on one line of code. The rotating index card-file with sound was my favorite.

    So, it seems LET is basically a one-line macro with variable assignment and substitution, and resultant formulas wrapped inside a function.
    • I'm seeing that everything between the first "(" and "FILTER" is you setting up variables
    • I'm seeing that the first variables are used to generate secondary variables
    • FILTER is after the last comma of the LET formula, telling LET that all the variables are to be used in the FILTER formula.
    • The FILTER + CHOOSE combo does the heavy lifting - I'm still not sure how

    Thank you again.
    Last edited by akedm; 08-17-2021 at 03:16 PM.

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

    Re: FILTER or XLOOKUP? One criteria in multiple locations; possible multiple results list

    You're welcome & thanks for the feedback.
    I feel there must be a simpler way, but couldn't come up with one.

+ 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. Help on XLOOKUP formula with multiple criteria
    By lyzas in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-22-2021, 05:06 AM
  2. Multiple criteria for XLOOKUP formula
    By mikehk in forum Excel General
    Replies: 1
    Last Post: 06-28-2021, 05:50 PM
  3. [SOLVED] XLOOKUP to return cell based on multiple criteria in single column
    By mikehay08 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-24-2021, 02:59 PM
  4. [SOLVED] Filter multiple sheets based on 3 criteria and return results into single cell
    By matt2877 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-02-2021, 12:07 AM
  5. Replies: 9
    Last Post: 07-23-2015, 01:21 PM
  6. [SOLVED] Need to sum multiple locations for 1 program, current results yield 0
    By Webbers in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-25-2012, 01:33 PM
  7. [SOLVED] How do I advance filter to multiple locations at once?
    By imills in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-01-2006, 02:15 PM

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