+ Reply to Thread
Results 1 to 15 of 15

Using Indirect Function + Xlookup + 2 Criteria!!!???

  1. #1
    Registered User
    Join Date
    03-05-2023
    Location
    Portugal
    MS-Off Ver
    Office 365
    Posts
    11

    Using Indirect Function + Xlookup + 2 Criteria!!!???

    Hello Guys,

    Hope all of you are OK.

    In excel file attachment have a very simple question: - using Indirect Function + Xlookup + 2 Criteria.
    The cell reference is B3.
    Already have table named ranges "JAN" and "FEB".
    Table results is in B5:E8.

    Can you please give a hand?

    Thank you very much!!! 
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,045

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    For the sample data:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,557

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    I would try to avoid INDIRECT, id possible. If

    a) your O365 is a recent version, and

    b) the "bricks" are in the same order (as they were in your sample), why not use a one-cell dynamic array:

    =LET(A,SCAN("",H4:P4,LAMBDA(x,y,IF(y="",x,y))),CHOOSECOLS(FILTER(H6:P8,(A=B3)),2,3,4))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,557

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    And if they are in a different order int he result section, you can use:

    =LET(A,SCAN("",H4:P4,LAMBDA(x,y,IF(y="",x,y))),B,B6:B8,C,FILTER(H6:P8,(A=B3)),DROP(REDUCE(0,B,LAMBDA(x,y,VSTACK(x,FILTER(C,INDEX(C,,1)=y)))),1,1))
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-05-2023
    Location
    Portugal
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    Dear Guys,

    Thank you very much to all.
    Thats a small example.
    In my personal workbook have a 12 different tables each one with a lot of columns and rows.

    Dear Glenn Kennedy,
    Yes I have O365 in this particular formula would be more usel if use "Indirect" with XLookup because it would be more easier to relate each one individually.
    Can you please give a hand?
    Thank you very much. Indirect Function + Xlookup_V2.xlsx

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,557

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    I'm on my way out to a big gig in Dublin. I'll take a look in the morning.

  7. #7
    Registered User
    Join Date
    03-05-2023
    Location
    Portugal
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    Dear Glenn Kennedy,

    Sure my friend!!!
    Have a great time!!!👍👍🍻🍻🍻
    Big hug.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,557

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    Are you saying that the header columns (JAN, FEB) that were in your sample sheet are NOT in your real data??

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,557

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    If so:

    =CHOOSE(MONTH(1&B3),I6:K8,N6:P8)

    and add on additional months:

    =CHOOSE(MONTH(1&B3),I6:K8,N6:P8,March,April,May,etc)
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    03-05-2023
    Location
    Portugal
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    Dear Gleen Kennedy,

    Hope are fine.
    In order to help just made an upgrade of the tables structures more similar to my personal workbook.
    When change cell B3 to "JAN" it is correct but when change to "FEB" give an error and doesnt the correct values.
    Without disturb can you please give an expertise hand?
    Thank you very much.Indirect Function + Xlookup_V2.xlsx

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,557

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    It is OK. Change it to Jan, then back to Feb again....

    Double-check that calculation options are set to automatic.

  12. #12
    Registered User
    Join Date
    03-05-2023
    Location
    Portugal
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    Dear Gleen Kennedy,

    Highly grateful.
    Just decide to put my workbook structure at your disposal so you can expertisely give me your feedback.
    Have only the tables month with all data: Jan, Feb. In this example to be simple just put 2 months however in my personal will have the 12 months.
    With the refrence month in cell in C3 and reference D7 want to fill data in range C9:J9 accordingly.
    Thats why my question about indirect function would be more easier because of the amount of tables and data.
    Can you give a look? Indirect Function + Xlookup_V3.xlsx
    Any question please let me know.
    Thank you very much Gleen. 

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,557

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    1. Where is January? Please put in AT LEAST two months.

    2. What is meant to go in column K?

    3. Is this text "hmR Region Values" always in the first column/row in each month?

  14. #14
    Registered User
    Join Date
    03-05-2023
    Location
    Portugal
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    Dear Gleen Kennedy,

    Highly grateful.
    1.So, Jan is data in range M44:AE78 and FEB range M7:AE41.
    2.In order to help just gave in sheet 2 different examples accordingly what it has to go in column C8:J9.
    3.Yes.
    Indirect Function + Xlookup_V3.xlsx

    Any question please let me know.
    Thank you very much.

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,557

    Re: Using Indirect Function + Xlookup + 2 Criteria!!!???

    Before spending more time on this....

    Originally, you showed February BESIDE January... now you show it BELOW January. Where are the remaining months? Nicely organised below January and February... or in some horrible 2D pattern.
    Last edited by Glenn Kennedy; 03-17-2023 at 11:05 AM.

+ 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. Xlookup multiple criteria
    By mcis19 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-26-2023, 11:18 AM
  2. Xlookup functions with 2 criteria
    By kirana2014 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-22-2023, 09:26 PM
  3. Using XLOOKUP for 2 search criteria
    By santoma in forum Excel General
    Replies: 10
    Last Post: 01-13-2023, 03:12 PM
  4. [SOLVED] Xlookup for 2 criteria to search
    By Eric Tsang in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-20-2022, 12:42 PM
  5. [SOLVED] xlookup multiple criteria #Value!
    By justinwb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-05-2022, 09:10 PM
  6. [SOLVED] XLOOKUP using INDIRECT with named range to search across multiple dynamic sheets
    By MangoFresh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-02-2022, 11:24 AM
  7. Xlookup with multiple criteria
    By Mackay2m in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 01-12-2022, 04:09 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