+ Reply to Thread
Results 1 to 13 of 13

LOOKUP function help

Hybrid View

jakeruby LOOKUP function help 06-11-2012, 03:10 AM
Pepe Le Mokko Re: LOOKUP function help 06-11-2012, 03:14 AM
jakeruby Re: LOOKUP function help 06-11-2012, 03:29 AM
jakeruby Re: LOOKUP function help 06-11-2012, 03:21 AM
TMS Re: LOOKUP function help 06-11-2012, 03:22 AM
vlady Re: LOOKUP function help 06-11-2012, 03:32 AM
jakeruby Re: LOOKUP function help 06-11-2012, 03:35 AM
TMS Re: LOOKUP function help 06-11-2012, 03:43 AM
TMS Re: LOOKUP function help 06-11-2012, 03:45 AM
TMS Re: LOOKUP function help 06-11-2012, 03:52 AM
TMS Re: LOOKUP function help 06-11-2012, 04:06 AM
jakeruby Re: LOOKUP function help 06-11-2012, 04:14 AM
TMS Re: LOOKUP function help 06-11-2012, 04:46 AM
  1. #1
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Question LOOKUP function help

    hi all, first post here...

    so I have two worksheets, one with ~1000 entries (names in col. A with other data filled out) and the other, my lookup table, with the same names (except some are missing, ie only ~800 names in this sheet) in col. A with the relevant data i am using the lookup function for.

    while i have successfully formulated the function as it correctly returns values, it only returns values for the first ~800 names on the ~1000 entry worksheet with no regard for the name im looking up.

    for example, if names 1,2,3 are on worksheet A, but only names 1,3 are on my lookup table, it returns value for 2 next to 3.

    if this seems confusing please let me know, the issue is that i have a different number of entries for my lookup table then the worksheet i am using the lookup function for.

    thanks

    PS-- i should also note that since there are less values in my lookup table then my function table, after the first ~800 entries (the amount that returns all data from the lookup table) the function simply returns 0 for the rest of the ~200 entries even if they are in the lookup table and I am searching for their values
    Last edited by jakeruby; 06-11-2012 at 03:15 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,622

    Re: LOOKUP function help

    Could you please post a small sample sheet?

  3. #3
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: LOOKUP function help

    here is a sample
    SAMPLE.xlsx

    in this case, the function would return fda and yt values for as and fda respectively with 0s for the last 2 entries

    =LOOKUP(A2;report!A2:A789;lookup!B2:B748) is the code from my sheet

  4. #4
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: LOOKUP function help

    here is a sample
    SAMPLE.xlsx

    in this case, the function would return fda and yt values for as and fda respectively with 0s for the last 2 entries

    =LOOKUP(A2;report!A2:A789;lookup!B2:B748) is the code from my sheet
    Last edited by jakeruby; 06-11-2012 at 03:28 AM.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,474

    Re: LOOKUP function help

    And it might be helpful to tell us what the formula is.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: LOOKUP function help

    can you re-attach the sample file..
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  7. #7
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: LOOKUP function help

    SAMPLE.xlsx

    thanks again for the help

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,474

    Re: LOOKUP function help

    Try:

    =LOOKUP(A2;lookup!$A$2:$A$1000;lookup!$B$2:$B$1000)


    Regards, TMS

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,474

    Re: LOOKUP function help

    Actually, that won't work because your example doesn't have a sheet called "lookup"

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,474

    Re: LOOKUP function help

    Thanks for the rep. Is this solved?

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,474

    Re: LOOKUP function help

    Please answer in the thread, not by PM.

    thanks for your help..

    the problem is that the formula you sent is essentially the same thing as my original. my formula is correct but im wondering if there is a way to nest another forumal inside the same cell?

    do you know if there is a way for the formula to check if the name (A) is in the lookup table, and if not to skip that entry? that is the issue since there are more entires in my first table then in my lookup table

    jake

    The formula is not essentially the same as yours. The number of entries in your first table is irrelevant but the lookup references should both be on the same sheet and have the same number of entries. The lookup will return #N/A if the value is not found. This can be trapped using IFERROR and a default value provided.

    I think you should have a look at the help for these functions.

    Regards, TMS

  12. #12
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: LOOKUP function help

    that is the issue, they do not have the same number of entries which is why there is a discrepancy...

    can i turn this into another question and ask if there is an easy way to delete entries not present on both sheets? vlookup has not worked but if you can find a way with the sample i provided above it would be appreciated

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,474

    Re: LOOKUP function help

    With your example data, to return the "Line of Service":

    =IFERROR(VLOOKUP(Sheet1!$A2,Sheet2!$A:$D,2,FALSE),"Not Found")

    Filter on Not Found to list those that do not appear on the reference sheet.

    If you wish, you can select the visible rows and delete them.

    Regards, TMS

+ 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