+ Reply to Thread
Results 1 to 7 of 7

VLookup to give Blank result

  1. #1
    Forum Contributor
    Join Date
    04-20-2010
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2016
    Posts
    151

    VLookup to give Blank result

    I have explained on the attached sheet what I want to accomplish.

    What I basically want to do is have VLookup search criteria and subtract values, and when no data is found in the search criteria, it needs to give a Blank ("").
    Attached Files Attached Files
    Last edited by mrcois; 06-30-2010 at 03:29 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: VLookup to give Blank result

    Put -F2 INSIDE:

    =IF(ISNA(VLOOKUP(A2;$J$3:$L$30;3;0));"";VLOOKUP(A2;$J$3:$L$30;3;FALSE)-F2)

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: VLookup to give Blank result

    Also.. Slightly better to use MATCH than VLOOKUP for criteria:

    =IF(ISNA(MATCH(A2;$J$3:$J$30;0));"";VLOOKUP(A2;$J$3:$L$30;3;FALSE)-F2)

    (replace ; with , if needed)

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

    Re: VLookup to give Blank result

    Put the F2 inside the last closing bracket:

    =IF(ISNA(VLOOKUP(A2,$J$3:$L$30,3,0)),"",VLOOKUP(A2,$J$3:$L$30,3,FALSE)-F2)
    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.

  5. #5
    Forum Contributor
    Join Date
    04-20-2010
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2016
    Posts
    151

    Re: VLookup to give Blank result

    Thanks for the replies....

    I do I change the formula to STILL show a Blank when there is no value in F2?

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

    Re: VLookup to give Blank result

    Do you mean leave cell blank until F2 is filled in?

    =IF(F2="","",IF(ISNA(VLOOKUP(A2,$J$3:$L$30,3,0)),"",VLOOKUP(A2,$J$3:$L$30,3,FALSE)-F2))

  7. #7
    Forum Contributor
    Join Date
    04-20-2010
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2016
    Posts
    151

    Re: VLookup to give Blank result

    Thanks a million for your input...

    NBVC's formulas is what really worked for me.

+ 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