Handle VLOOKUP N/A errors with IFNA in Google Sheets

In Google Sheets, combine IFNA with VLOOKUP to replace N/A results by an empty or user-friendly value.
In this example, we'll try to find a company name based on a domain name and get a Not found message:

Formula in G4
=IFNA(VLOOKUP(G3,B4:D6,3,FALSE),"Not found")
A
B
C
D
E
F
G
H
1
2
Column 1
Column 2
Column 3
👇 Try changing this value
3
Domain
Size
Company name
Lookup value
4
google.com
139995
Google
Result
Not found
5
talarian.io
50
Talarian
6
microsoft.com
182268
Microsoft
7
Open in Google Sheets
Show arrows
Separator

Procedure

  1. Build the VLOOKUP formula:
    1. Enter =VLOOKUP in cell G4, where you want the Company name to appear.
    2. Enter the Lookup value G3, which contains the Domain name (domain.com) you want to look for.
    3. Enter the Search range B4:D6, which is the data range containing the Domain, and the Company name values.
    4. Enter Column number 3, as the Company name column is the 3rd column of the Search range.
    5. Enter FALSE to look for an exact match.
  2. Build the IFNA formula around the VLOOKUP formula:
    1. Enter IFNA( between the = and VLOOKUP formula.
      The formula looks like this: =IFNA(VLOOKUP(G4, B4:D6, 3, FALSE)
    2. Enter "Not found" right after the VLOOKUP formula.
      The formula looks like this: =IF(VLOOKUP(F4, B4:D6, 3, FALSE), "Not found")

Result

The final formula is: =IFNA(VLOOKUP(G3, B4:D6, 3, FALSE), "Not found")
IFNA returns the value in G4, which is Not found.

Show reference