+ Reply to Thread
Results 1 to 5 of 5

Returning #VALUE when using IF condition for Vlookup

  1. #1
    Registered User
    Join Date
    09-16-2013
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2007
    Posts
    6

    Returning #VALUE when using IF condition for Vlookup

    Returing #value when using IF condition for Vlookup. Giving below exmaple.

    Col. A Col. B Col. C Col. D (Match Result)
    Row1 A1 AAA A2 #VALUE!
    Row2 A2 BBB A6 #N/A
    Row3 A3 CCC
    Row4 A4 DDD
    Row5 A5 EEE
    I want to write the value of col. B into Col. D by using the below formula if the value of Col. C matches with the value of Col. A.
    =IF(VLOOKUP(C1,$A$1:$B$5,1,FALSE),B1)

    When both Col. A and Col. C values are numeric then the formula works but when the value is text result returns #VALUE!

    Please help me.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Returning #VALUE when using IF condition for Vlookup

    Hi,

    Try instead

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you note that with your original formula whichever numeric you use you will always return the B1 value. That's because your Vlookup returns a numeric and the IF test interprets a numeric as True and hence returns the B1 value - you have no False argument in your IF test.

    With alpha characters in the Vlookup then the IF test doesn't evaluate to True or False, hence the error you see.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    09-16-2013
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Returning #VALUE when using IF condition for Vlookup

    Thanks a lot Richard... it's working

  4. #4
    Registered User
    Join Date
    08-04-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2016
    Posts
    18

    Re: Returning #VALUE when using IF condition for Vlookup

    Just a tip I have found useful when using the "IFERROR" type function...rather than using a blank, I will have it report back a character so i can see that the function is in play. Examples could be "-" or "." Richard's answer is spot on and very useful with any such issues you run into when you get the dratted #N/A or #VALUE; just thought i would throw my two cents in.

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Returning #VALUE when using IF condition for Vlookup

    soumendu_bose

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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. Table Data... Returning a value after checking a condition
    By hiteshasrani43 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-09-2012, 12:05 PM
  2. IF condition returning wrong result.
    By Tomboy in forum Excel General
    Replies: 3
    Last Post: 06-01-2012, 01:00 AM
  3. Excel 2010 - returning a name, per condition met
    By RP_supporter2012 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-09-2012, 02:19 PM
  4. condition not returning False
    By okl in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-30-2008, 08:08 AM
  5. [SOLVED] how to create a condition returning 2 different drop down lists?
    By Laurent in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-21-2005, 03:06 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