+ Reply to Thread
Results 1 to 10 of 10

VLOOKUP formula that also can prevent the cell from showing a 0 if the Cell is blank

  1. #1
    Registered User
    Join Date
    03-02-2016
    Location
    AZ
    MS-Off Ver
    2010
    Posts
    25

    VLOOKUP formula that also can prevent the cell from showing a 0 if the Cell is blank

    Hello All,

    With the formula below I am doing a VLOOKUP. The issue is that if the cell is blank that the data is being pulled from a 0 is entered

    Please Login or Register  to view this content.
    Is it possible to build in the IFERROR feature and still do the VLOOKUP?

    Thanks

    John
    Last edited by JJAngel; 11-20-2019 at 03:31 PM. Reason: Grammer

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Prevent the cell from having a 0 if the Cell is blank

    =if($M$4="",0,VLOOKUP($M$4,EmployeeData!$A$2:$L$22,12,FALSE))
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    03-02-2016
    Location
    AZ
    MS-Off Ver
    2010
    Posts
    25

    Re: Prevent the cell from having a 0 if the Cell is blank

    mehmetcik,

    Thank you for your response...

    I entered the formula you suggested and it still showing a zero

    I think the issue is that M4 is on the sheet that is pulling the data from another sheet (EmployeeData)

    If $A$2:$L$22 have no data then that is where the 0 comes in play

    John
    Last edited by JJAngel; 11-20-2019 at 02:27 PM. Reason: Clarification

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: VLOOKUP formula that also can prevent the cell from showing a 0 if the Cell is blank

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    03-02-2016
    Location
    AZ
    MS-Off Ver
    2010
    Posts
    25

    Re: VLOOKUP formula that also can prevent the cell from showing a 0 if the Cell is blank

    mehmetcik,

    Very well... I will put that together!!

    Thanks again,

    John

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: VLOOKUP formula that also can prevent the cell from showing a 0 if the Cell is blank

    Is the formula returning TEXT or a NUMBER?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.92 for Mac MS 365
    Posts
    8,619

    Re: VLOOKUP formula that also can prevent the cell from showing a 0 if the Cell is blank

    is this what you are looking for?
    =IF(VLOOKUP($M$4,EmployeeData!$A$2:$L$22,12,FALSE)=0,"",VLOOKUP($M$4,EmployeeData!$A$2:$L$22,12,FALSE))
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: VLOOKUP formula that also can prevent the cell from showing a 0 if the Cell is blank

    If it is TEXT, use:

    =VLOOKUP($M$4,EmployeeData!$A$2:$L$22,12,FALSE)&""

    If it is a NUMBER, use:

    =IFERROR(1/(1/VLOOKUP($M$4,EmployeeData!$A$2:$L$22,12,FALSE)),"")

  9. #9
    Registered User
    Join Date
    03-02-2016
    Location
    AZ
    MS-Off Ver
    2010
    Posts
    25

    Re: VLOOKUP formula that also can prevent the cell from showing a 0 if the Cell is blank

    Sambo & Glenn,

    You both have it right... It is Text and tested both of your solutions and the both wor…

    Thanks so much!!!

    John

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: VLOOKUP formula that also can prevent the cell from showing a 0 if the Cell is blank

    You're welcome and thanks for the rep.

+ 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. Prevent formula if any cell is blank
    By OGAngryHulk in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-04-2018, 04:58 PM
  2. [SOLVED] VBA to prevent saving of excel if cell is blank
    By anuj_sethi1043 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 08-14-2014, 06:37 PM
  3. [SOLVED] Force data entry in cell with drop down list (i.e. Prevent user from leaving cell blank)
    By moosetales in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-15-2014, 05:28 AM
  4. prevent blank cell in excel worksheet
    By jatman in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-29-2006, 10:08 AM
  5. [SOLVED] how to prevent blank cell copied when combining cells?
    By Vicneswari Murugan in forum Excel General
    Replies: 2
    Last Post: 08-18-2005, 09:05 AM
  6. [SOLVED] prevent a user leaving a blank cell in excel2003
    By Ian Varty in forum Excel General
    Replies: 1
    Last Post: 04-15-2005, 09:06 AM
  7. [SOLVED] prevent blank cell
    By Ken Stratford in forum Excel General
    Replies: 5
    Last Post: 03-28-2005, 09: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