+ Reply to Thread
Results 1 to 8 of 8

Lookup Results Are Coming Up Offset???

  1. #1
    Registered User
    Join Date
    09-18-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    46

    Lookup Results Are Coming Up Offset???

    I have created a workbook with two sheets. The first has a table in which one column is named "ClassRaw" and I need it to give the description for that class in another column. On the second sheet there is a table listing all classes in column A (named "Class") and their descriptions in column B (named "ClassDesc"). I used the formula =Lookup(ClassRaw,Class,ClassDesc) to pull up the correct description on my first sheet but for some reason it is pulling up the description from the line above where it should for some of the lines. Example is attached.

    Any clue what's going on???
    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,644

    Re: Lookup Results Are Coming Up Offset???

    Your ranges aren't properly defined. Try this:

    =LOOKUP([@Class],Table2[Class],Table2[Class Description])
    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
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,075

    Re: Lookup Results Are Coming Up Offset???

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    but most of the value in the Class named range have spaces after them, which need to be removed.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,998

    Re: Lookup Results Are Coming Up Offset???

    Use this:

    =VLOOKUP([@Class],'Class Key'!A:B,2,FALSE)

    BUt you also need to delete all trailing spaces from column A in Class Key. I used =LEN(Table2[@Class]) to check. You can see that almost all of them have trailing spaces!!
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Registered User
    Join Date
    09-18-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Lookup Results Are Coming Up Offset???

    Woohoo!!! You found the problem! Those stupid spaces were messing everything up. Thank you!

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,075

    Re: Lookup Results Are Coming Up Offset???

    Not sure which of us you are referring to, but glad to help & thanks for the feedback.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,998

    Re: Lookup Results Are Coming Up Offset???

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

  8. #8
    Registered User
    Join Date
    09-18-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Lookup Results Are Coming Up Offset???

    My apologies. Glenn, it was your answer that did the trick. I gave you rep and marked as solved. Thanks again!

+ 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 Coming up with Combination Lookup value based on Rank Result
    By tvieson in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-14-2022, 07:45 PM
  2. Replies: 4
    Last Post: 05-19-2015, 08:42 PM
  3. Offset results in VBA
    By wolfram13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-14-2013, 04:56 PM
  4. [SOLVED] VBA; using .offset(1, 1) results in nothing happening
    By Søren Larsen in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-12-2012, 04:59 PM
  5. Excel 2007 : Dynamic Range/Offset, No results
    By Webbers in forum Excel General
    Replies: 6
    Last Post: 07-26-2010, 12:19 PM
  6. Values not coming in few cell but coming in rest all cells
    By rashmib in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2009, 11:19 AM
  7. returning offset results with a lookup formula
    By z2xm in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-19-2007, 12:02 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