+ Reply to Thread
Results 1 to 7 of 7

An Array VLOOKUP that returns a value from a random position

  1. #1
    Registered User
    Join Date
    12-03-2013
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    13

    An Array VLOOKUP that returns a value from a random position

    Hi.

    Can someone please help me find a formula that would act as a vlookup but would look up and return a value even if it is not on the first position within the array. I have an SAP export that has on Column A the batch number and on column B the item description. The thing is that within the multiple batch number arrays it allocates on column B the item description only for one row and randomly (sometimes first, last or in the middle).


    Thanks for your help and for taking the time to read my post.


    All the best

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: An Array VLOOKUP that returns a value from a random position

    Hello and welcome
    Please see attached
    not first.xlsx
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,366

    Re: An Array VLOOKUP that returns a value from a random position

    hope it more clear with example

    azumi
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-03-2013
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: An Array VLOOKUP that returns a value from a random position

    Hello,

    Thank you very much for your help!
    Can you also help me fill the fields with the formula such as in the attached file?

    addit.xlsx

    Thank you

    George

  5. #5
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,366

    Re: An Array VLOOKUP that returns a value from a random position

    I'm used formula from Mika, perfect for your needs pls check the file

    Azumi
    Attached Files Attached Files

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: An Array VLOOKUP that returns a value from a random position

    i think you can use this shorter non array formula
    =INDEX($B$4:$B$21,MATCH(1,INDEX(($A$4:$A$21=F4)*($B$4:$B$21<>""),0),0))
    or
    =LOOKUP(1,1/(($A$4:$A$21=F4)*($B$4:$B$21<>"")),$B$4:$B$21)
    Last edited by martindwilson; 12-04-2013 at 09:30 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Registered User
    Join Date
    12-03-2013
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: An Array VLOOKUP that returns a value from a random position

    Thank you all very much for your help.

    All the best!

+ 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. Vlookup returns Array
    By blueiris8 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-22-2013, 10:25 PM
  2. VLOOKUP array function returns the same column
    By murphy_sj in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-15-2012, 12:35 AM
  3. vlookup returns last value in array
    By Nicholas Scarpinato in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-12-2006, 02:10 PM
  4. [SOLVED] vlookup based on random result returns incorrect result
    By rickat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-05-2005, 09:20 AM
  5. How do I find random number in list of random alpha? (Position is.
    By jlahealth-partners in forum Excel General
    Replies: 0
    Last Post: 02-08-2005, 02:06 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