+ Reply to Thread
Results 1 to 8 of 8

Vlookup

  1. #1
    Forum Contributor
    Join Date
    08-31-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    204

    Vlookup

    Hi all, have a small question..

    I am using VLOOKUP to locate data for a list of numbers. however my numbers are preceded by aposthropes. My VLOOKUP will only work if I click the little exclamation mark box and format as number. Is there any other way to vlookup avoiding the the formating?

    When i created a macro to format my numbers it seems my macro does not pick that up?

    Has anyone else experienced this?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VLOOKUP question

    Hi,

    It sounds like you're looking up a number in a range which contains text values.Try converting the first term of the VLOOKUP(), currently presumably a number, to text.
    i.e.

    Please Login or Register  to view this content.
    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    08-31-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    204

    Re: VLOOKUP question

    I get an error "#NAME?" by A1 I pressume you mean cell where my number is?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VLOOKUP question

    Hi,

    Yes, that's correct.

    Rgds

  5. #5
    Forum Contributor
    Join Date
    08-31-2010
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    204

    Re: VLOOKUP question

    it actually just gives me same error #N/A.. it is really strange..

    When I click the exclamation mark and choose "Conver to Number" my vlookup works

    When I right click, go to Format Cells, and Choose> Number it does not work...

    Any suggestions>?

  6. #6
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Kalgoorlie Australia
    MS-Off Ver
    Excel 2007/10
    Posts
    251

    Re: VLOOKUP question

    Hello
    Have you converted them all to numbers? to do this, place a 1 in any empty cell, make sure it is stored as a number, copy it, highlight (select) the data you want to convert, special paste, multiply.
    Regards
    Peter

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VLOOKUP question

    Hi,

    Before it was a #NAME error so something has changed.

    I suggest you upload the workbook so that we can see the question in context.

    Rgds

  8. #8
    Registered User
    Join Date
    09-20-2010
    Location
    Portoviejo
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    1

    Re: Vlookup

    The Richard's solution must work!

    Maybe you forgot to replace the "myrange" argument in the sample formula provided: =VLOOKUP(TEXT(A1,0),myrange,2,FALSE)

    You may have written something like this: =VLOOKUP(TEXT(A1,"0"),myrange,2,FALSE)

    Excel does not find the named range "myrange" and returns the error "#NAME?"

    Regarding the cell formatting, it does not work because of the apostrophe (Excel cannot get rid of it by simply change the format of a cell).

    I recommend you to make the Vlookup formula more coherent, if you are looking up numbers then the lookup column must contain numbers.

    In your case, it is very simply and it takes no time to do it...

    To convert all the lookup columns into numbers without clicking on the exclamation mark cell by cell do this...

    Select the entire column and then select the exclamation mark and click convert to number. All the cells will be converted to numbers (the apostrophe will disappear)

+ 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