+ Reply to Thread
Results 1 to 14 of 14

VLookup returns "0" instead of ""

  1. #1
    Forum Contributor
    Join Date
    04-28-2016
    Location
    Stavanger, Norway
    MS-Off Ver
    365
    Posts
    142

    VLookup returns "0" instead of ""

    I have the following formula in my Excel spreadsheet;

    =VLOOKUP("*"&$B$11&"*";X_data;COLUMN(C1);0)

    When it finds a blank cell it returns "0" instead og "". I tried to do a double Vlookup, (se below) but this also didnt work


    =IF(LEN(VLOOKUP("*"&$B$11&"*";ALS_data;COLUMN(C1);0))=0;"";VLOOKUP("*"&$B$11&"*";ALS_data;COLUMN(C1);0))

    Please advice

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: VLookup returns "0" instead of ""

    There are instructions at the top of the page explaining how to attach your sample workbook. Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: VLookup returns "0" instead of ""

    LEN of 0 = 1
    remove LEN and use IF again

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,909

    Re: VLookup returns "0" instead of ""

    Try this

    =IF(VLOOKUP("*"&$B$11&"*";ALS_data;COLUMN(C1);0)="";"";VLOOKUP("*"&$B$11&"*";ALS_data;COLUMN(C1);0))

    Or

    =VLOOKUP("*"&$B$11&"*";ALS_data;COLUMN(C1);0)&""

    .

  5. #5
    Forum Contributor
    Join Date
    04-28-2016
    Location
    Stavanger, Norway
    MS-Off Ver
    365
    Posts
    142

    Re: VLookup returns "0" instead of ""

    Thanks for quick reply. None of them worked unfortunately

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: VLookup returns "0" instead of ""

    Define "none of them worked". And provide a workbook, as I requested.

  7. #7
    Forum Contributor
    Join Date
    04-28-2016
    Location
    Stavanger, Norway
    MS-Off Ver
    365
    Posts
    142

    Re: VLookup returns "0" instead of ""

    Thanks for quick reply. It did not seem to work unfortunately. I kept getting "0" returned in the cell

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: VLookup returns "0" instead of ""

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

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: VLookup returns "0" instead of ""

    Please provide a workbook!

  10. #10
    Forum Contributor
    Join Date
    04-28-2016
    Location
    Stavanger, Norway
    MS-Off Ver
    365
    Posts
    142

    Re: VLookup returns "0" instead of ""

    That worked, thanks! :D

  11. #11
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: VLookup returns "0" instead of ""

    to whom is the post #10 ?

  12. #12
    Forum Contributor
    Join Date
    04-28-2016
    Location
    Stavanger, Norway
    MS-Off Ver
    365
    Posts
    142

    Re: VLookup returns "0" instead of ""

    Quote Originally Posted by sandy666 View Post
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    That worked, thanks! :D

  13. #13
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: VLookup returns "0" instead of ""

    ok, thanks
    I think you didn't read post #3

    anyway hit Add Reputation and mark thread as Solved, if you whish of course

  14. #14
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: VLookup returns "0" instead of ""

    To avoid using the VLOOKUP twice, you could use this:

    =IFERROR(1/(1/VLOOKUP("*"&$B$11&"*";ALS_data;COLUMN(C1);0));"")

    Note that this only works if you are returning numbers. If you are expecting to return text values (perhaps in the other columns), then you can use this:

    =VLOOKUP("*"&$B$11&"*";ALS_data;COLUMN(C1);0) &""

    as already advised.

    Hope this helps.

    Pete

+ 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. Replies: 3
    Last Post: 11-19-2020, 08:30 PM
  2. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  3. Replies: 2
    Last Post: 07-24-2017, 02:19 AM
  4. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  5. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  6. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM

Tags for this Thread

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