+ Reply to Thread
Results 1 to 7 of 7

Lookup but Return Range field should be based on Criteria

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Philippines
    MS-Off Ver
    Microsoft Office 365
    Posts
    53

    Lookup but Return Range field should be based on Criteria

    Hello. I need help on lookup formula. The return range is not based on a fixed source.

    E,g, if my criteria is 28-Jan, the return range will be on column B of Lookup Table.
    If my criteria 6-Feb, the return range is column D of Lookup Table.

    Lookup Table 28-Jan 30-Jan 6-Feb 10-Mar
    6-Jan 34,712 15,546 18,521 34,712
    13-Jan 27,342 15,092 16,798 27,342
    20-Jan 25,411 15,319 16,244 25,411
    27-Jan 19,876 15,206 16,930 19,876

    Criteria 6-Jan 13-Jan 20-Jan 27-Jan
    28-Jan 34,712 27,342 25,411 19,876
    30-Jan 15,546 15,092 15,319 15,206
    6-Feb 18,521 16,798 16,244 16,930
    10-Mar 34,712 27,342 25,411 19,876
    Attached Files Attached Files

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

    Re: Lookup but Return Range field should be based on Criteria



    In B8 copied across and down, perhaps?

    =INDEX($B$2:$E$5,MATCH(B$7,$A$2:$A$5,0),MATCH($A8,$B$1:$E$1,0))
    Attached Files Attached Files
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  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 2403
    Posts
    44,054

    Re: Lookup but Return Range field should be based on Criteria

    What do you expect to see? Where do you expect to see it?
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  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 2403
    Posts
    44,054

    Re: Lookup but Return Range field should be based on Criteria

    One guess (until an explanation is forthcoming)...


    =INDEX($B$2:$E$5,MATCH(B$7,$A$2:$A$5,0),MATCH($A8,$B$1:$E$1,0)) in B8, copied across and down.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-10-2012
    Location
    Philippines
    MS-Off Ver
    Microsoft Office 365
    Posts
    53

    Re: Lookup but Return Range field should be based on Criteria

    Hi Ali. Thanks your formula works. Can you also do a same but Criteria is based on column instead?
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-10-2012
    Location
    Philippines
    MS-Off Ver
    Microsoft Office 365
    Posts
    53

    Re: Lookup but Return Range field should be based on Criteria

    Yes, this formula works. Thank you Glenn.

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

    Re: Lookup but Return Range field should be based on Criteria

    All OK?

    You're welcome. Thanks for letting us know that you got an answer.




    Please take a moment and consider clicking the "Add Reputation" button at the foot of any of the posts of anyone who helped you reach a solution here today.

    Finally, if that takes care of your original question, please click on "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ 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. Multiple criteria lookup return row range
    By unknown_brother in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-01-2019, 09:23 PM
  2. [SOLVED] Lookup based on 2 criteria to return in table (solved)
    By ChrisDFloyd in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-23-2019, 10:55 AM
  3. Lookup based on multiple criteria and return value in column
    By Ariff_Chowdhury in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-01-2019, 10:08 PM
  4. [SOLVED] Lookup a value within a range with 2 additional criteria, return a value
    By gaker10 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-12-2018, 08:17 PM
  5. [SOLVED] V-Lookup based upon multiple criteria to return a value. Or a better way!
    By gboyleuk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-23-2015, 04:21 AM
  6. Lookup/ Return a value within date range base on criteria
    By kelkelkel08 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 01-16-2014, 05:10 AM
  7. Replies: 10
    Last Post: 02-19-2013, 12:05 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