Consulting

Results 1 to 7 of 7

Thread: Solved: VLOOKUP now you see it now you don't!

  1. #1
    VBAX Newbie
    Joined
    Jul 2005
    Posts
    5
    Location

    Solved: VLOOKUP now you see it now you don't!

    Hi

    I've been using the following VLOOKUP function for a while on a sales data spreadsheet and everything has been working great.

    VLOOKUP($C1,Prices,2,FALSE)

    Column C contains product codes
    Prices is a named range with 2 cols; Product Code and Product Price on a separate worksheet.

    However, after I recently updated the Prices array with a number of new rows I am now finding that the formula returns #NA for a number of instances, even those that relate to previously acceptable values in column C.

    The problem appears to be with the exact match argument, as when I remove the FALSE clause the function does return a value. Unfortunately I need it to be an exact match.

    The Prices array parameters appear fine (ie the region encompasses all data). Is there something I have forgotten to do?

    I'm away for a few days so if anyone gets a chance to give me some advice, please don't think I'm being ignorant if I don't respond immediately.

    thanks


  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Moved to Excel Help forum.

  3. #3
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Can you post a sanitised version of your workbook?

  4. #4
    Make sure the looked up categories are an exact match on both the source and the looking up range. Maybe you have an odd trailing space somewhere?
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  5. #5
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    You might also want to check for text values versus numeric.

  6. #6
    VBAX Newbie
    Joined
    Jul 2005
    Posts
    5
    Location
    Quote Originally Posted by Jan Karel Pieterse
    Make sure the looked up categories are an exact match on both the source and the looking up range. Maybe you have an odd trailing space somewhere?
    Thanks for the reply. Your hint, plus others, led me to find that the data was in two different formats and also contained trailing spaces. I don't know if the solution I then used was the most convenient but I used the TRIM function to "standardise" the target cells and the reference range and it appears to be working.

    many thanks for taking the time to help


  7. #7
    VBAX Newbie
    Joined
    Jul 2005
    Posts
    5
    Location
    Quote Originally Posted by geekgirlau
    You might also want to check for text values versus numeric.
    Thanks for the reply. Your hint, plus others, led me to find that the data was in two different formats and also contained trailing spaces. I don't know if the solution I then used was the most convenient but I used the TRIM function to "standardise" the target cells and the reference range and it appears to be working.

    many thanks for taking the time to help


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •