+ Reply to Thread
Results 1 to 2 of 2

How to make VLOOKUP return 0 (ZERO) if the search criteria is not found

  1. #1
    Forum Contributor
    Join Date
    08-14-2006
    Location
    USA
    MS-Off Ver
    2019
    Posts
    686

    How to make VLOOKUP return 0 (ZERO) if the search criteria is not found

    I want to make VLOOKUP return 0 (ZERO) if the search criteria is not found.
    (or find another function to use)

    I have a spreadsheet of shipped items.
    Those that were air freighted return a cost in the air freight column based on a VLOOKUP from the air freight cost spreadsheet.
    Those that were not air shipped return #N/A because they were not found.
    I cannot total my air freight cost column because of the #N/A results

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by carstowal
    I want to make VLOOKUP return 0 (ZERO) if the search criteria is not found.
    (or find another function to use)

    I have a spreadsheet of shipped items.
    Those that were air freighted return a cost in the air freight column based on a VLOOKUP from the air freight cost spreadsheet.
    Those that were not air shipped return #N/A because they were not found.
    I cannot total my air freight cost column because of the #N/A results
    =If(Vlookup("seek",table,1,false)<>"seek",0,Vlookup("seek",table,2,false))

    or

    =If(iserror(Vlookup("seek",table,2,false)),0,Vlookup("seek",table,2,false))

    should do that.

    note, the 0 can be replaced with another function.
    ---
    Last edited by Bryan Hessey; 10-05-2006 at 06:00 PM.

+ 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