+ Reply to Thread
Results 1 to 5 of 5

Vlookup formula is not picking what I want due to wrong format - but i cant change it

  1. #1
    Forum Contributor
    Join Date
    12-30-2008
    Location
    Woking, England
    MS-Off Ver
    Excel 2007
    Posts
    197

    Vlookup formula is not picking what I want due to wrong format - but i cant change it

    Hi,

    Im trying to turn a manufacturer code into a supplier code using a vlookup formula. I has changed the majority of them but there are some codes that the formula is not picking up.

    I have applied a filter to identify the problem items and have highlighted the column that I need the supplier code. The supplier code on sheet 3 is column F.

    I know that the text codes at the top of 'sheet 1' have trailing spaces and that they need to be trimmed but i need to some how change the format of the numeric codes below that that are throwing out #N/As.

    Please can some one explain what i need to do to the format of these codes.

    Thanks for you help

    Sam
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Vlookup formula is not picking what I want due to wrong format - but i cant chang

    It's a common problem. In Sheet3 cell A604 is the code VPD-0-DF-S, but there is also a trailing space, so it's not the same string. You'll need to clean up those space tails. The TRIM() function will do it, the edit/pastespecial-values back over the original data.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Vlookup formula is not picking what I want due to wrong format - but i cant chang

    At first glance this doesn't appear to be stricly a format issue.
    If you try a manual search using the built in Find feature (Ctrl+F) the values for which #NA is shown are not found.

    Thus VLOOKUP appears to be returning the correct result because the value is, in fact, not in the list.

    You do need to normalize your data: numeric values should be numeric. You can quickly do this with a Copy | Paste Special | Multiply (x1)

  4. #4
    Forum Contributor
    Join Date
    12-30-2008
    Location
    Woking, England
    MS-Off Ver
    Excel 2007
    Posts
    197

    Re: Vlookup formula is not picking what I want due to wrong format - but i cant chang

    Hi,

    I knew about the trailing spaces on the codes at the top, thats something i didnt get round to doing before posting.

    What I cant understand is the PAC, Faac and Fermax products. As they are present in sheet 3. IE C4218 in sheet 1 is row 5499 in sheet 3. so theyre definatley there. when i click on the little green triangle in sheet 3 and convert it to a number it then appears in sheet 1.

    your copy, paste special and x1 thing worked Palmetto. but why cant i just turn them into numeric numbers by right clicking and formating that way.

    Please help

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Vlookup formula is not picking what I want due to wrong format - but i cant chang

    Post removed.

+ 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