+ Reply to Thread
Results 1 to 6 of 6

vlookup to return 0 and blanks

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    46

    vlookup to return 0 and blanks

    I have a formula that needs to return blanks as blank and 0s as 0. The vlookup formula will return blanks as 0, or I can make it return a blank whenever it is zero (below), but some cells may have a 0 record that need to return 0s, not blank.

    Right now I am missing a few records that are entered as "0". I have:

    =IFERROR(IF(VLOOKUP(O16,'Sheet1'!$A:$Z,8,FALSE)=0,"",VLOOKUP(O16,'Sheet1'!$A:$Z,8,FALSE)),"")

    any ideas?

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: vlookup to return 0 and blanks

    you could try
    iferror(--(VLOOKUP(O17,Sheet1!$A:$Z,8,FALSE)&""),"")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    11-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: vlookup to return 0 and blanks

    hey that works well, except it does not show any records with text. can you please explain the "--"

  4. #4
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: vlookup to return 0 and blanks

    =IF(ISBLANK(VLOOKUP(O16,'Sheet1'!$A:$Z,8,FALSE)),"",VLOOKUP(O16,'Sheet1'!$A:$Z,8,FALSE))

    That should do the job.
    Say thanks, click *

  5. #5
    Registered User
    Join Date
    11-07-2012
    Location
    NY
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: vlookup to return 0 and blanks

    harribone. worked great i added iferror around it as well. thanks

  6. #6
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: vlookup to return 0 and blanks

    No probs, don't forget to mark thread solved.

+ 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