+ Reply to Thread
Results 1 to 3 of 3

Data type error when using VLOOKUP

  1. #1
    Registered User
    Join Date
    08-21-2007
    Posts
    14

    Data type error when using VLOOKUP

    I am using VLOOKUP to pull a rate from one workbook to another, but there are two strange things going on:

    1. If the lookup value is not in the array, it inserts a number from the table anyway instead of a #REF! error.

    2. For 5 specific numbers in the array, if the lookup value is one of them I get a #VALUE! error saying that a value used in the fornula is of the wrong datatype.

    Alll columns are formatted as numbers with 3 decimal places.

    Has this happened to anyone else?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    What formula are you using?

    If you only want an exact match make sure your VLOOKUP uses a 4th argument of zero or FALSE. If lookup value is not in the lookup range this will then give you #N/A.

    You wouldn't usually get a #VALUE error from a VLOOKUP unless #VALUE occurs in the referenced ranges. If you have a data mismatch check that all data is numeric. You can't do this by looking at the formatting - use ISNUMBER function to check.

    If any data is not numeric but looks like it is then you can convert by using the following process.

    Copy an unused blank cell.

    Select range to convert > Edit > Paste Special > Add > OK

  3. #3
    Registered User
    Join Date
    08-21-2007
    Posts
    14
    Strangely,

    by changing the lookup value from 12.000 to #12 for example, the problem was solved.

+ 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