Results 1 to 5 of 5

Thread: VLOOKUP (XP)

  • Thread Tools
  1. Lounger
    Join Date
    Apr 2004
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VLOOKUP (XP)

    Hello,
    I am trying to use the VLOOKUP to create the following: Value to look for is in A1, look for it in Column 1 of table in Sheet2, return value in column 2 in B1...how can I write this? What I have so far (which obviously is not working: =IF(A1<>"",VLOOKUP(1,Inventory!A1:C74,2),"")

    Please help!

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VLOOKUP (XP)

    Apart from a typo in your message I see nothing wrong:

    =IF(A1<>"",VLOOKUP(1,Inventory!A1:C74,2),"")
    must be
    =IF(A1<>"",VLOOKUP(A1,Inventory!A1:C74,2),"")

    Note that without the last argument, vlookup gives an entry close to the one you are trying to match when no match is found.

    To return an exact match, you need this:

    =IF(A1<>"",VLOOKUP(A1,Inventory!A1:C74,2,FALSE),"" )
    What do you get and what would you expect?
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  4. Lounger
    Join Date
    Apr 2004
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VLOOKUP (XP)

    Hello Jan Karel,
    Thank you, it works now, I actually ended up understanding my mistake. However I would have another question for you: How do I save a file while keeping the number format of the cell (i.e: when I try to run a macro to save as file name = Cell M3, instead of getting 00002, I get 2)...How can I make it keep the zeros in front?

  5. WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    10,921
    Thanks
    11
    Thanked 277 Times in 271 Posts

    Re: VLOOKUP (XP)

    In the macro use something like

    filename = format(range("m3"),"00000")& ".xls"

    Steve

  6. Lounger
    Join Date
    Apr 2004
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VLOOKUP (XP)

    Thank you very much Steve.

Posting Permissions

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