+ Reply to Thread
Results 1 to 6 of 6

return zero in a VLOOKUP

  1. #1
    Registered User
    Join Date
    05-07-2014
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    23

    return zero in a VLOOKUP

    Hi,

    If i am doing a VLOOKUP to another sheet, and if it is not on that sheet, i want to return '0' rather than #N/A.

    What formula can i use please?

    I am currently using =IF(ISERROR((VLOOKUP(I2,'Rebate 6 wks'!$L$3:$M$77,2,FALSE))=0),0,VLOOKUP(I2,'Rebate 6 wks'!$L$3:$M$77,2,FALSE)). is there a shorter one?!

    Thanks

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: return zero in a VLOOKUP

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    07-10-2014
    Location
    East Sussex, England
    MS-Off Ver
    2007, 2010
    Posts
    51

    Re: return zero in a VLOOKUP

    edunne

    Since you are using later than 2003 you can shorten using IFERROR(,) instead of IF(,,) and ISERROR() nested:

    Please Login or Register  to view this content.
    Helpful?
    Robbo

  4. #4
    Registered User
    Join Date
    07-10-2014
    Location
    East Sussex, England
    MS-Off Ver
    2007, 2010
    Posts
    51

    Re: return zero in a VLOOKUP

    Quote Originally Posted by Olly View Post
    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    LOL! You beat me by 2 minutes!

  5. #5
    Registered User
    Join Date
    07-10-2014
    Location
    East Sussex, England
    MS-Off Ver
    2007, 2010
    Posts
    51

    Re: return zero in a VLOOKUP

    Quote Originally Posted by Olly View Post
    =IF(question_answered=TRUE,mark_thread="solved")
    =IF(someone_helped=TRUE,Reputation=Reputation+1)
    [/formula]
    Yep, I like it!

  6. #6
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: return zero in a VLOOKUP

    try this if you are using... excel 2003
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    otherwise use..
    Olly's Formula..
    that is..

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


    Don't forget to click *

+ 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: 1
    Last Post: 02-20-2014, 08:42 AM
  2. [SOLVED] Formula to always return cell below what a vlookup would return
    By KCHEXCEL in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-28-2013, 12:57 AM
  3. [SOLVED] vlookup of two items to return a third vlookup value into a cell
    By PhoenixFaery in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-12-2013, 07:33 PM
  4. Worksheet function Vlookup and VLOOKUP return different results
    By zandero in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2010, 08:24 AM
  5. [SOLVED] Vlookup that does not return #N/A
    By carl in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 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