+ Reply to Thread
Results 1 to 8 of 8

Dumbfounded by VLOOKUP error

  1. #1
    Registered User
    Join Date
    10-08-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    4

    Dumbfounded by VLOOKUP error

    Hi,

    I have a VLOOKUP function of the following format VLOOKUP(A1, B1:C20, 2, FALSE).

    A1 can take any date value
    Range B1:C20 contains date values from March 1 to March 20 (column B) and a corresponding sales number (column C).

    However, if I in cell A1 type in 3/31/2014 it returns the value for March 20 instead of N/A. In fact, for any number > March 20, it will return the March 20 number.

    I don't understand why this is happening, since I've opted for "FALSE" in argument 4 - shouldn't that imply that only EXACT matches are returned?

    Help extremely appreciated!!

    /Nic

  2. #2
    Forum Contributor
    Join Date
    12-23-2003
    Posts
    179

    Re: Dumbfounded by VLOOKUP error

    In D1 enter and copy down:

    =ISNUMBER(B1)

    All of the cells of the D range should show TRUE. Any FALSE value would indicate a text (date).

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Dumbfounded by VLOOKUP error

    Hi zhengming and welcome to the forum,

    Perhaps this will fix the problem?

    VLOOKUP(A1, $B$1:$C$20, 2, FALSE)

    Making the lookup range fixed might be the cure.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    10-08-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Dumbfounded by VLOOKUP error

    Hmm. Didn't think about this. In reality, B1:B20 is B1:B40 with every other cell a text value. I presume VLOOKUP doesn't appreciate this? Is there a workaround?

  5. #5
    Registered User
    Join Date
    10-08-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Dumbfounded by VLOOKUP error

    Marvin,
    Thank you! Sorry, I missed to specify but the range is actually fixed, but is I wrote above all date values are descending but every other value contains text.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Dumbfounded by VLOOKUP error

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Dumbfounded by VLOOKUP error

    Time for an IfError...

    IfError(VLOOKUP(A1, $B$1:$C$20, 2, FALSE),"")

    Try that as a formula and pull it down.

  8. #8
    Registered User
    Join Date
    10-08-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Dumbfounded by VLOOKUP error

    I resolved the problem. I tried to simplify the problem - it's quite a big formula with nested and repeating IF, OR, IFERROR, INDEX, MATCH, VLOOKUP functions - hence my vision was blurred and I mislocated the problem - the problem was the in the MATCH and not the VLOOKUP function. I apologize for that but thanks a lot for your suggestions - I found it while trying to create an intelligible sample workbook.

+ 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. Iferror vlookup if error vlookup if x=Y,
    By rwmeis in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-21-2013, 08:24 PM
  2. How to error trap a vlookup that returns an error or #N/A
    By kjy1989 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2013, 12:01 PM
  3. [SOLVED] lookup - if(is error(vlookup and error messages meanings
    By grphillips in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-18-2013, 07:03 PM
  4. Replies: 0
    Last Post: 05-14-2012, 11:59 PM
  5. VLOOKUP error
    By aaron81006 in forum Excel General
    Replies: 5
    Last Post: 03-24-2010, 09:27 AM

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