+ Reply to Thread
Results 1 to 3 of 3

Using VLOOKUP referencing other cells with formulas.

  1. #1
    Registered User
    Join Date
    09-08-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    70

    Smile Using VLOOKUP referencing other cells with formulas.

    Hi all,

    A little background:

    I have a sheet where I import data from a raw text file. That data has item codes ranging from "00000" to "99999".

    To prevent excel removing the leading zeros, I converted the values to text using the formula:
    Please Login or Register  to view this content.
    . To make things simpler, I have used this formula for all values in the range irrespective of whether the have leading zeros or not.

    The reason I did that was because I have used the formula
    Please Login or Register  to view this content.
    to pick out certain groups of numbers and I couldn't think of a way to achieve this if I had a mixture of strings and numbers in the same range.

    The issue I have is that when I attempt a VLOOKUP on the range above
    Please Login or Register  to view this content.
    It is fine where there is a match, but where there is no match, instead of returning the blank I have requested (or think I have), it is returning "0's"

    Is there a way to prevent this, or a better way to handle the data?

    Many thanks for your time as always!

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

    Re: Using VLOOKUP referencing other cells with formulas.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. 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

  3. #3
    Registered User
    Join Date
    09-08-2011
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: Using VLOOKUP referencing other cells with formulas.

    Hi again,

    Well as it happens, when creating the example you requested I noticed the issue didn't arise. From there it didn't take long to figure out the raw ASCI import needed cleaned.

    Sorry to waste your time!

+ 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