Results 1 to 6 of 6

Thread: IF and VLOOKUP
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Jun 2019
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default IF and VLOOKUP

    Hello!

    I'm trying to set a formula that if cell B5 has text, then it activates the VLOOKUP on a database on another sheet, however, I'm trying to get that if the cell on the database is blank it does not show 0.

    So far I got this formula:

    =IF(ISTEXT(B4),VLOOKUP(B4,Sheet2!A4:H11001,7,FALSE),"")

    However I'm not sure how to make sure that it doesn't show a 0.

    Does anybody know how to get it to not show a 0 if it is blank?

    Thanks!

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    23,928
    Post Thanks / Like
    Mentioned
    406 Post(s)
    Tagged
    42 Thread(s)

    Default Re: Help witth IF and VLOOKUP

    Hi & welcome to MrExcel
    How about
    =IF(ISTEXT(B4),if(VLOOKUP(B4,Sheet2!A4:H11001,7,FALSE)=0,"",VLOOKUP(B4,Sheet2!A4:H11001,7,FALSE)),"")
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #3
    New Member
    Join Date
    Nov 2015
    Posts
    24
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Help witth IF and VLOOKUP

    Goto File -> Options -> Advanced -> Under 'display options for this workbook' uncheck "Show a zero in cells that have zero value"

    does that work for you?

  4. #4
    Board Regular kweaver's Avatar
    Join Date
    May 2018
    Location
    La Jolla, CA
    Posts
    398
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Help witth IF and VLOOKUP

    You wrote "if cell B5 has text" but your IF statement checks B4. And, are you looking to return the result from column G (that's the 7th column)?

  5. #5
    New Member
    Join Date
    Jun 2019
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Help witth IF and VLOOKUP

    Quote Originally Posted by Fluff View Post
    Hi & welcome to MrExcel
    How about
    =IF(ISTEXT(B4),if(VLOOKUP(B4,Sheet2!A4:H11001,7,FALSE)=0,"",VLOOKUP(B4,Sheet2!A4:H11001,7,FALSE)),"")
    Thank you so much! That formula worked perfectly!

  6. #6
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    23,928
    Post Thanks / Like
    Mentioned
    406 Post(s)
    Tagged
    42 Thread(s)

    Default Re: Help witth IF and VLOOKUP

    You're welcome & thanks for the feedback
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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