+ Reply to Thread
Results 1 to 6 of 6

Lookup for a alphanumeric value in an Array

  1. #1
    Registered User
    Join Date
    11-05-2012
    Location
    India
    MS-Off Ver
    Mac Excel 2011
    Posts
    3

    Question Lookup for a alphanumeric value in an Array

    Hi

    I am trying to lookup for a alphanumeric value within a certain data range and if the value is found, I want to get the value from the corresponding row.
    In the image attached, I would like to look for values that are in column A, within the range B2:C9. If the value is found I want the value from column D corresponding to the row in which the value was found.
    For e.g. I want to look for value in A5 in the range B2:C9. The value is found in C3, therefore the value in the corresponding row in Column D which is the value in cell D3 will be printed.

    I would really appreciate your help to find a solution.

    Thanks
    Attached Images Attached Images
    Attached Files Attached Files

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

    Re: Lookup for a alphanumeric value in an Array

    you can make use of iferror
    =IFERROR(IFERROR(INDEX($D$2:$D$9,MATCH(A5,$B$2:$B$9,0)),INDEX($D$2:$D$9,MATCH(A5,$C$2:$C$9,0))),"not found")
    "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

  3. #3
    Registered User
    Join Date
    11-05-2012
    Location
    India
    MS-Off Ver
    Mac Excel 2011
    Posts
    3

    Re: Lookup for a alphanumeric value in an Array

    Thanks for that MartinDwilson.

    I am trying that formula over 4 and 6 columns and excel throws me an error for having too many arguments. Is there a way around it?

    Thanks

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

    Re: Lookup for a alphanumeric value in an Array

    that's not what you asked originally is it!

  5. #5
    Registered User
    Join Date
    11-05-2012
    Location
    India
    MS-Off Ver
    Mac Excel 2011
    Posts
    3

    Re: Lookup for a alphanumeric value in an Array

    Quote Originally Posted by martindwilson View Post
    that's not what you asked originally is it!
    I had assumed I would be able to replicate the formula over 4 columns.
    My bad!

  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: Lookup for a alphanumeric value in an Array

    try this array entered formula
    =INDEX(Sheet1!D1:D9,MAX(IF(Sheet1!B$1:C$9=A5,ROW(Sheet1!A$1:A$9))))

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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