+ Reply to Thread
Results 1 to 5 of 5

VLook Up Help

  1. #1
    Forum Contributor
    Join Date
    06-07-2006
    Posts
    121

    VLook Up Help

    Right now I am using the VLookup below to let me know if the code in C6413 is Valid or Not by comparing it to another tab. If C6413 is listed on the Codes Tab there is a match and the word Valid will appear in cell B6413.

    =VLOOKUP(C6413,Codes!B:E,4,FALSE)


    However, if cell B6413 is blank you get an error (#N/A) message in cell C6413.

    1 I am trying to avoid the error message.
    2 If the code in cell B6413 does not appear on the codes tab I would Like the word INVALID to appear in cell C6413

    I tried the formula below but it doesn't work and I am lost. Any suggestions???

    =IF(ISERROR,0(VLOOKUP(C6413,Codes!B:E,4,FALSE))
    Last edited by VBA Noob; 06-18-2008 at 09:45 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    In Excel 2007,

    =IFERROR(VLOOKUP(C6413,Codes!B:E,4,FALSE),"INVALID")

    Other Excel versions:

    =IF(ISNA(VLOOKUP(C6413,Codes!B:E,4,FALSE)),"INVALID",VLOOKUP(C6413,Codes!B:E,4,FALSE))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    06-07-2006
    Posts
    121
    What if cell C6413 is blank? Can I have Cell D6413 where the formula listed below is posted come up blank???





    =IF(ISNA(VLOOKUP(C6413,Codes!B:E,4,FALSE)),"INVALID",VLOOKUP(C6413,Codes!B:E,4,FALSE))

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    =IF(C6413="","",IF(ISNA(VLOOKUP(C6413,Codes!B:E,4,FALSE)),"INVALID",VLOOKUP(C6413,Codes!B:E,4,FALSE)))

  5. #5
    Forum Contributor
    Join Date
    06-07-2006
    Posts
    121
    As Emeril would say,

    BAM!!!

    Thanks NBVC!!! That's exactly what I need.

    Can you help me with a formula that will calculate this Saturdays winning Lotto numbers??? That would help.

+ 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