+ Reply to Thread
Results 1 to 6 of 6

Complex look up formula having both vertical and horizontal lookup areas

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-20-2012
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    454

    Complex look up formula having both vertical and horizontal lookup areas

    Hello,

    I want to retrieve the data of each lookup symbol for various dates. The problem here is that the dates are arranged horizontally whereas the symbol names are arranged vertically in the lookup area. How can I retrieve the data using a formula. I tried using the xlookup but failed to get the values. I am herewith attaching the sample data

    =XLOOKUP(1,(A10=RawData!B3:X3)*(Analysis!$H$2=RawData!$A$4:$A$13),RawData!$B$4:$X$13)
    Thank you
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-07-2022
    Location
    Europe
    MS-Off Ver
    Office 365
    Posts
    473

    Re: Complex look up formula having both vertical and horizontal lookup areas

    Sumproduct should do the trick
    Formula: copy to clipboard
    =SUMPRODUCT(   RawData!$B$4:$X$13,    (RawData!$A$4:$A$13 = Analysis!$H$2)  * (RawData!$B$3:$X$3 = Analysis!$A10))
    <<< If you have valued anyone's contributions in this thread, please click * to thank them for their efforts

  3. #3
    Valued Forum Contributor
    Join Date
    01-07-2022
    Location
    Europe
    MS-Off Ver
    Office 365
    Posts
    473

    Re: Complex look up formula having both vertical and horizontal lookup areas

    or alternatively a nested lookup
    Formula: copy to clipboard
    =XLOOKUP(  $H$2,  RawData!$A$4:$A$13,  XLOOKUP( $A10,  RawData!$C$3:$X$3, RawData!$C$4:$X$13 ) )

  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,662

    Re: Complex look up formula having both vertical and horizontal lookup areas

    Option 1 (copied down):
    =INDEX(RawData!$B$4:$X$13,MATCH(Analysis!$H$2,RawData!$A$4:$A$13,0),MATCH(Analysis!A10,RawData!$B$3:$X$3,0))

    Option 2 (spill array):
    =BYROW(A10:A30,LAMBDA(x,INDEX(RawData!B4:X13,MATCH(H2,RawData!A4:A13,0),MATCH(x,RawData!B3:X3,0))))
    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

  5. #5
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,663

    Re: Complex look up formula having both vertical and horizontal lookup areas

    =INDEX(RawData!$B$4:$X$13,MATCH(Analysis!$H$2,RawData!$A$4:$A$13,0),MATCH(Analysis!$A10,RawData!$B$3:$X$3,0))
    Try this index/match formula.
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  6. #6
    Valued Forum Contributor
    Join Date
    01-07-2022
    Location
    Europe
    MS-Off Ver
    Office 365
    Posts
    473

    Re: Complex look up formula having both vertical and horizontal lookup areas

    Four different methods to get to the same results

    Out of interest, has anyone done analysis with large datasets to see how they compare on performance overhead? Conventional wisdom is that index/matches are optimal - but I am curious against LAMBDAs and XLOOKUPs

+ 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] Lookup Right & Below i.e Horizontal & Vertical lookup to filter data
    By paradise2sr in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-25-2022, 04:27 PM
  2. [SOLVED] Horizontal look up and vertical return (Complex)
    By pmw19800 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2021, 04:58 AM
  3. Replies: 25
    Last Post: 09-17-2020, 02:30 PM
  4. Formula for v lookup vertical and horizontal column.
    By visha_1984 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-27-2020, 10:14 AM
  5. [SOLVED] lookup if my lookup array with my data position is vertical and horizontal
    By daboho in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-29-2015, 05:35 AM
  6. [SOLVED] VBA Vertical and horizontal Lookup ???
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 03-07-2014, 06:15 PM
  7. Replies: 4
    Last Post: 02-03-2014, 12:47 AM

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