+ Reply to Thread
Results 1 to 13 of 13

Lookup Formula

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Lookup Formula

    Hi,

    I am looking for a lookup formula to transfer a list from one order to another list in a different order.

    What I want to do be able to do on the attached example is enter a letter (A-J) in column C and then column H to self populate. So as per the attached example; I want H2 to pickup Switzerland from column B (as the first country in group A), H3 to pickup Germany from column B (as it is the second country in the list to be in group A), H7 = Portugal (first country to be in group B), and so on, and so on...

    Ideally I want to keep to using a formula for this rather than adding a process for the user to either re-sort the data or to use any VBA. I've tried to find a suitable lookup formula or a combination of lookup formula's but I just can;t seem to work it out!

    Any help would be much appreciated.

    Thanks,
    Adam.
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Lookup Formula

    Try this in H2:

    =INDEX(B:B,SMALL(IF(C$2:C$56=F2,ROW(C$2:C$56)),G2)) Ctrl Shift Enter

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

    Re: Lookup Formula

    An array formula in H2, copied down:

    =INDEX(B:B,SMALL(IF($C$2:$C$56=F2,ROW($C$2:$C$56)),G2))

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    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 2403
    Posts
    44,099

    Re: Lookup Formula

    or...

    a non-array (just use ENTER) alternative:

    =INDEX($B:$B,SMALL(INDEX(($C$2:$C$56<>F2)*10^10+ROW($C$2:$C$56),0),G2))

  5. #5
    Banned User!
    Join Date
    10-12-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    358

    Re: Lookup Formula

    Please remove this is wrong
    Last edited by xjohnson; 11-27-2018 at 01:02 PM.

  6. #6
    Banned User!
    Join Date
    10-12-2018
    Location
    Texas
    MS-Off Ver
    2010
    Posts
    358

    Re: Lookup Formula

    Never mind most likely Glenn has a better solution.

    Sorry,
    XJ

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Lookup Formula

    another non-array formula
    Enter in H2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

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

    Re: Lookup Formula

    OP's profile says 2007, so no AGGREGATE function.

  9. #9
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Lookup Formula

    Quote Originally Posted by Glenn Kennedy View Post
    OP's profile says 2007, so no AGGREGATE function.
    I guess I was looking at the wrong OP
    Then this one

    regular formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by AlKey; 11-27-2018 at 02:14 PM.

  10. #10
    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,099

    Re: Lookup Formula

    Alkey... YOU making a mistake.... there must be a blue moon in the sky tonight!! Your latest looks like a minor variant of mine...

  11. #11
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Lookup Formula

    Quote Originally Posted by Glenn Kennedy View Post
    Alkey... YOU making a mistake.... there must be a blue moon in the sky tonight!! Your latest looks like a minor variant of mine...
    I introduced NOT function to make formula more logical (<>F2 to =F2).

  12. #12
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Re: Lookup Formula

    They work perfect - thanks guys.

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

    Re: Lookup Formula

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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 with adjusting Index lookup formula to include additional lookup criteria
    By kingofcamden in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-14-2018, 01:04 PM
  2. Replies: 3
    Last Post: 08-23-2017, 07:04 PM
  3. [SOLVED] Modified LOOKUP Formula for Excluding Missing Lookup Values
    By aaochsner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-23-2017, 07:29 PM
  4. Replies: 4
    Last Post: 05-19-2015, 08:42 PM
  5. [SOLVED] Lookup formula to find lowest value with variable lookup criteria
    By brharrii in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-27-2015, 03:00 AM
  6. [SOLVED] Can lookup formula ignore blank cells until the lookup value has been entered?
    By Ju1cy in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-13-2014, 01:32 PM
  7. Replies: 5
    Last Post: 02-24-2011, 11:26 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