+ Reply to Thread
Results 1 to 13 of 13

Lookup table vs Index vs IFSEARCH Help

  1. #1
    Registered User
    Join Date
    03-20-2015
    Location
    Buffalo, NY
    MS-Off Ver
    2010
    Posts
    21

    Lookup table vs Index vs IFSEARCH Help

    Hi,
    I have a spreadsheet containing numeric exam codes, and their descriptive names among other data. I want to categorize the exams as either Screening or diagnostic. I have tried to do this 3 ways with no success, help!
    First I tried an index with the exam codes but there seem to be too many in the range...
    Next I tried if the cell contains "screening" it returns screening, if not it is"diagnostic" Couldn't get that to work
    Last I tried a lookup table and it doesn't seem to recognize the lookup value to find it in the referenced range. I tried making sure both fields are in number format... no luck.
    Now I'm just really frustrated!

    table is in the second tab
    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,799

    Re: Lookup table vs Index vs IFSEARCH Help

    This will work:

    =VLOOKUP([@CODE],Table2,2,0)

    but not until you have got rid of the leading spaces in the column containing the codes next to it.
    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
    Registered User
    Join Date
    03-20-2015
    Location
    Buffalo, NY
    MS-Off Ver
    2010
    Posts
    21

    Re: Lookup table vs Index vs IFSEARCH Help

    Quote Originally Posted by AliGW View Post
    This will work:

    =VLOOKUP([@CODE],Table2,2,0)

    but not until you have got rid of the leading spaces in the column containing the codes next to it.
    Which column has leading spaces?

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,196

    Re: Lookup table vs Index vs IFSEARCH Help

    The code in"Exams" appeeared to be TEXT while those in Sheet2 are numeric.

    Correcting codes in "Exams" produced matches using VLOOKUP although many codes are missing.
    Attached Files Attached Files

  5. #5
    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,799

    Re: Lookup table vs Index vs IFSEARCH Help

    Quote Originally Posted by hwminich View Post
    Which column has leading spaces?
    The one referenced in the first part of the VLOOKUP formula. Column I on the exams sheet.

  6. #6
    Registered User
    Join Date
    03-20-2015
    Location
    Buffalo, NY
    MS-Off Ver
    2010
    Posts
    21

    Cool Re: Lookup table vs Index vs IFSEARCH Help

    Quote Originally Posted by AliGW View Post
    The one referenced in the first part of the VLOOKUP formula. Column I on the exams sheet.
    Thanks! that worked.

  7. #7
    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,799

    Re: Lookup table vs Index vs IFSEARCH Help

    You're welcome!

  8. #8
    Registered User
    Join Date
    03-20-2015
    Location
    Buffalo, NY
    MS-Off Ver
    2010
    Posts
    21

    Re: Lookup table vs Index vs IFSEARCH Help

    when I use the trim function to remove the leading spaces, the lookup function doesn't work anymore.
    Last edited by hwminich; 02-14-2017 at 02:17 PM. Reason: spelling

  9. #9
    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,799

    Re: Lookup table vs Index vs IFSEARCH Help

    That's because it's not a real space.

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,196

    Re: Lookup table vs Index vs IFSEARCH Help

    Select COLUMN I

    Data==>Text-to-Columns==> third screen=>General=> Finish

    Then

    =IFERROR(VLOOKUP(I2,Table2[#All],2,FALSE),"")

    should work.

  11. #11
    Registered User
    Join Date
    03-20-2015
    Location
    Buffalo, NY
    MS-Off Ver
    2010
    Posts
    21

    Re: Lookup table vs Index vs IFSEARCH Help

    the data is coming from and ODBC connection so

  12. #12
    Registered User
    Join Date
    03-20-2015
    Location
    Buffalo, NY
    MS-Off Ver
    2010
    Posts
    21

    Re: Lookup table vs Index vs IFSEARCH Help

    Quote Originally Posted by hwminich View Post
    the data is coming from and ODBC connection so
    Yes! thank you

  13. #13
    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,799

    Re: Lookup table vs Index vs IFSEARCH Help

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

+ 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. [SOLVED] Having trouble with IFSEARCH FORMULA
    By hwminich in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-05-2017, 02:12 PM
  2. [SOLVED] Index and match in lookup table
    By Samantha McNeill in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-28-2016, 07:35 PM
  3. Table Lookup/Index Match Help
    By mustangsally in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-21-2015, 06:29 PM
  4. need help populating table using lookup or index function
    By vt78cruiser in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-25-2013, 10:00 AM
  5. [SOLVED] Trying to combine ifsearch and if statements
    By Nicola13 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2012, 09:09 AM
  6. table, index, array, match, lookup?
    By spxer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-08-2006, 04:35 PM
  7. Help with INDEX lookup please - Poker Odds Table
    By Jefferds44 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-17-2005, 08:25 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