+ Reply to Thread
Results 1 to 5 of 5

Thread: VLookup - Error when using text pulled from another sheet

  1. #1
    Registered User
    Join Date
    01-02-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    3

    VLookup - Error when using text pulled from another sheet

    What I am trying to involves 3 workbooks.

    Workbook #1
    Contains raw data and the necessary info which is text, like "Northeast" or "America East".

    Workbook#2
    The info from workbook #1 is aggregated into workbook #2 along with other info.

    Workbook #3
    Text with corresponding numbers which is serving as the vlookup range.
    Like this:
    America East 1.00
    Southern 1.05
    Northeast 1.10

    I am trying to get the Number value from Workbook #3 to display next to the text if it is appearing in #2.

    So what I though would work is: =vlookup(CB16,'[Workbook #3.xls]Sheet1$B$12:$C$44,2,FALSE)

    Workbook #3 is that table listed above, CB16 is the cell containing "America East".
    The problem is that CB16 doesn't just have the text "America East", it contains the formula ='[Workbook#1.xls]Sheet 1'!$A1

    So the issue is that it is trying to use a formula instead of just text as the vlookup, because when i just type America East into that cell, it works fine.

    Help!

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: VLookup - Error when using text pulled from another sheet

    Check that the cell '[Workbook#1.xls]Sheet 1'!$A1 doesn't have any extra trailing/leading spaces.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    01-02-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: VLookup - Error when using text pulled from another sheet

    Good Call.. It does have a trailing space, but this info is automatically generated so i can't remove the trailing spaces. Is there a way to work the formula around that?

  4. #4
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: VLookup - Error when using text pulled from another sheet

    Maybe:

    =vlookup(TRIM(CB16),'[Workbook #3.xls]Sheet1$B$12:$C$44,2,FALSE)

    or

    =vlookup(CLEAN(CB16),'[Workbook #3.xls]Sheet1$B$12:$C$44,2,FALSE)
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  5. #5
    Registered User
    Join Date
    01-02-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: VLookup - Error when using text pulled from another sheet

    Yahtzee!

    Trim worked. Thanks a lot!

+ 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.2.0