+ Reply to Thread
Results 1 to 11 of 11

VLOOKUP returns 0 after text conversion

  1. #1
    Registered User
    Join Date
    09-17-2020
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    18

    VLOOKUP returns 0 after text conversion

    Hello,

    I would like to check if an unique ID from the first tab (Data) is present in the second tab (Groups).
    I tried to VLOOKUP the original ID's in the first case but not all matches are displayed correctly.
    Figured this might be due some format differences, so I tried to create a separate column that converts the string to text first.
    However.. after doing so the VLOOKUP returns the 0 value..

    Could someone take a look at the example sheet? and let me know how I can return the original ID in column B if a match has been found?
    Instead of the 0's that are being returned at the moment?

    Thanks in advance

    ~ Niels
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: VLOOKUP returns 0 after text conversion

    Hi,
    Add "0" to your vlookup

    =VLOOKUP(F15,Groups!B:B,1,0)

  3. #3
    Forum Contributor
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016 / 2019
    Posts
    251

    Re: VLOOKUP returns 0 after text conversion

    Hi,

    You vlookup formula is incorrect

    =IFERROR(VLOOKUP(F2,Groups!B:B,1,FALSE), "not found")
    Christopher Yap

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,443

    Re: VLOOKUP returns 0 after text conversion

    Remember that using entire column references is bad practice
    As for the IFERROR function, see my sig

  5. #5
    Registered User
    Join Date
    09-17-2020
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    18

    Re: VLOOKUP returns 0 after text conversion

    Quote Originally Posted by belinda200 View Post
    Hi,
    Add "0" to your vlookup

    =VLOOKUP(F15,Groups!B:B,1,0)
    Still returned different value for me.



    Quote Originally Posted by bluesky63 View Post
    Hi,

    You vlookup formula is incorrect

    =IFERROR(VLOOKUP(F2,Groups!B:B,1,FALSE), "not found")
    Thanks, seems to work correctly now!


    Quote Originally Posted by Pepe Le Mokko View Post
    Remember that using entire column references is bad practice
    As for the IFERROR function, see my sig
    I understand this way creates room for error, but I think when using it to look up exact matching ID’s after text conversion it should be alright?

    Alternatively, what way/ formula would you suggest for doing crosscheck in this case?
    (Always eager to learn new/ better methods )

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,443

    Re: VLOOKUP returns 0 after text conversion

    I would use a hidden/helper column, let the NA happen if any then extract results with the ISNA function
    Any other error should then pop-up
    It's especially useful with large ranges

  7. #7
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: VLOOKUP returns 0 after text conversion

    Where did you plant mu formula?
    what I posted is relevant to line 15.

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,578

    Re: VLOOKUP returns 0 after text conversion

    Re: Hiding Errors
    If you'd rather not have a helper column, you can use
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I chose 10000 as a maximum # of data, adjust up or down as necessary.
    If you are just looking for Found/Not Found which is what your formula seems to be doing, possibly
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: VLOOKUP returns 0 after text conversion

    If you just want to know if it's present, you can use
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: VLOOKUP returns 0 after text conversion

    I believe COUNTIF is quite efficient, but it's always a good idea to limit the range rather than use full column references. You could use a fixed upper limit, use a Dynamic Named Range, or convert the reference list to a Structured Table.

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,029

    Re: VLOOKUP returns 0 after text conversion

    As you have 365, you could use the new xlookup function
    =XLOOKUP(F2,Groups!$B$2:$B$1000,Groups!$B$2:$B$1000,"not found",0)

+ 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. Conversion from numbers with text to simply a number without text or zero.
    By RigbyDigby in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-12-2019, 12:03 PM
  2. Replies: 1
    Last Post: 12-28-2018, 02:42 PM
  3. [SOLVED] Vlookup returns 0, but want to replace 0 with generic text
    By CB5 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 03-20-2018, 02:54 PM
  4. VLOOKUP conversion formula help
    By mgmacha71 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-17-2016, 11:11 PM
  5. VLOOKUP returns #N/A, EXACT returns TRUE
    By mgblair in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-02-2015, 07:37 PM
  6. VLookUp does returns text, not Hyperlink
    By Matt1985 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-08-2015, 01:20 PM
  7. how to bring all vlookup returns even with duplicate vlookup search keys
    By NYC4LIFE in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-06-2013, 04:53 PM

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