+ Reply to Thread
Results 1 to 6 of 6

Data lookup with multiple conditions - array for text AND numbers?

  1. #1
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Data lookup with multiple conditions - array for text AND numbers?

    I am currently using this formula to lookup corresponding data from sheet "Report", depending on if two conditions on Sheet 1 in column J (ID no. => text) and L (departure date => number) are met.

    Sheet 1:
    Please Login or Register  to view this content.
    Sheet "Report"
    ID no - departure date - confirmation number
    1234 - 24.12.2010 - ABCD

    wanted result: return "ABCD" as the correlative confirmation number.

    If I change the confirmation number to an actual number, it works fine, but if it contains any letters, the formula returns "0". Any idea why?

    Thank you very much,

    A2k
    Last edited by Armitage2k; 02-22-2011 at 07:09 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Data lookup with multiple conditions - array for text AND numbers?

    MIN returns Numbers - if the values aren't numbers then....

    It seems you're using XL2007 (or above) - first off avoid entire column references in your Arrays - the performance impact is significant.

    It's not clear if you have multiple matches for the combination or not...

    Please Login or Register  to view this content.
    note: restricted ranges - modify but bear in mind the above point

  3. #3
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: Data lookup with multiple conditions - array for text AND numbers?

    Wonderful, does the trick.
    Thank you very much,

    A2k

  4. #4
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Re: Data lookup with multiple conditions - array for text AND numbers?

    Just out of curiousity, how would i need to adjust the formula to make this work under office 2003? I just noticed that I get a reminder regarding loss of functionality when saving this file as a xls via office 2010.

    Thanks,
    A2k
    Last edited by Armitage2k; 02-22-2011 at 07:10 AM.

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: unsolved - Data lookup with multiple conditions - array for text AND numbers?

    You need to replace IFERROR(formula,"") with IF(ISERROR(formula),"",formula)
    Remember what the dormouse said
    Feed your head

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: unsolved - Data lookup with multiple conditions - array for text AND numbers?

    In this instance - given text result and inefficiency of original I'd be inclined to use:

    Please Login or Register  to view this content.
    this way the INDEX is performed once only though this does assume valid results never exceed 255 chars in length.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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