IFERROR
LogicalbeginnerIFERROR wraps around another formula and catches any error (#N/A, #VALUE!, #DIV/0!, etc.), replacing it with a value you choose. It's essential for building robust spreadsheets that don't break when data is missing or unexpected. Think of it as a safety net around your formulas.
Syntax
=IFERROR(value, value_if_error)Parameters
valueThe formula or expression to evaluate.value_if_errorWhat to return if the formula errors.? = optional parameter
Worked Example
You're looking up invoice 'INV-9998' which doesn't exist in the visible sample. Without IFERROR, VLOOKUP returns #N/A.
| Row numbers | A | B |
|---|---|---|
| Header row | invoice_id | vendor_name |
| 2 | INV-1001 | Cloudline Software |
| 3 | INV-1002 | Apex Office Supply |
| 4 | INV-1003 | Summit Consulting Group |
| 5 | INV-1004 | Meridian Travel Co. |
| 6 | INV-9999 | ← doesn't exist |
Formula
=IFERROR(VLOOKUP("INV-9998", A2:B6, 2, FALSE), "Not Found")Result
Not FoundVLOOKUP searches A2:B6 for 'INV-9998'. Because that invoice ID does not appear anywhere in rows 2 through 6, VLOOKUP returns #N/A and IFERROR replaces it with 'Not Found'.
Practice Exercises
2 exercises - work through each one using the data table below
Question
You're using VLOOKUP to find invoice details, but some invoice IDs may not exist. What does the following formula return when 'INV-9999' is not found in the dataset? =IFERROR(VLOOKUP("INV-9999", A2:I151, 2, FALSE), "Invoice not found")
Dataset
Vendor Spend Tracker (150 rows total)
Download CSV| Row numbers | A | B | C |
|---|---|---|---|
| Header row | |||
| 2 | INV-1001 | Cloudline Software | Software |
| 3 | INV-1002 | Apex Office Supply | Office Supplies |
| 4 | INV-1003 | Summit Consulting Group | Consulting |
| 5 | INV-1004 | Meridian Travel Co. | Travel |
| 6 | INV-1005 | Forge & Frame Creative | Marketing |
| 7 | INV-1006 | NovaTech Solutions | Software |
| 8 | INV-1007 | Atlas Hardware Co. | Hardware |
| 9 | INV-1008 | Clearview Data Systems | Software |
| 10 | INV-1009 | Redstone Marketing | Marketing |
| 11 | INV-1010 | Keystone Legal Advisors | Consulting |
| 12 | INV-1011 | Cloudline Software | Software |
| 13 | INV-1012 | Basecamp Events | Marketing |
| 14 | INV-1013 | Apex Office Supply | Office Supplies |
| 15 | INV-1014 | BrightPath Analytics | Software |
| 16 | INV-1015 | Meridian Travel Co. | Travel |
| 17 | INV-1016 | Clearview Data Systems | Software |
| 18 | INV-1017 | Apex Office Supply | Office Supplies |
| 19 | INV-1018 | Summit Consulting Group | Consulting |
| 20 | INV-1019 | Cloudline Software | Software |
| 21 | INV-1020 | Atlas Hardware Co. | Hardware |
| 22 | INV-1021 | Meridian Travel Co. | Travel |
| 23 | INV-1022 | Atlas Hardware Co. | Hardware |
| 24 | INV-1023 | Atlas Hardware Co. | Hardware |
| 25 | INV-1024 | Apex Office Supply | Office Supplies |
| 26 | INV-1025 | Redstone Marketing | Marketing |
| 27 | INV-1026 | Clearview Data Systems | Software |
| 28 | INV-1027 | Horizon IT Services | Software |
| 29 | INV-1028 | Basecamp Events | Marketing |
| 30 | INV-1029 | Redstone Marketing | Marketing |
| 31 | INV-1030 | BrightPath Analytics | Software |
| 32 | INV-1031 | Basecamp Events | Marketing |
| 33 | INV-1032 | Cloudline Software | Software |
| 34 | INV-1033 | Clearview Data Systems | Software |
| 35 | INV-1034 | Meridian Travel Co. | Travel |
| 36 | INV-1035 | Cloudline Software | Software |
| 37 | INV-1036 | Horizon IT Services | Software |
| 38 | INV-1037 | BrightPath Analytics | Software |
| 39 | INV-1038 | Cloudline Software | Software |
| 40 | INV-1039 | Horizon IT Services | Software |
| 41 | INV-1040 | Apex Office Supply | Office Supplies |
| 42 | INV-1041 | Summit Consulting Group | Consulting |
| 43 | INV-1042 | Clearview Data Systems | Software |
| 44 | INV-1043 | Forge & Frame Creative | Marketing |
| 45 | INV-1044 | NovaTech Solutions | Software |
| 46 | INV-1045 | Meridian Travel Co. | Travel |
| 47 | INV-1046 | Cloudline Software | Software |
| 48 | INV-1047 | Apex Office Supply | Office Supplies |
| 49 | INV-1048 | Apex Office Supply | Office Supplies |
| 50 | INV-1049 | Pinecrest Staffing | Consulting |
| 51 | INV-1050 | Clearview Data Systems | Software |
| 52 | INV-1051 | BrightPath Analytics | Software |
| 53 | INV-1052 | Keystone Legal Advisors | Consulting |
| 54 | INV-1053 | Cloudline Software | Software |
| 55 | INV-1054 | NovaTech Solutions | Software |
| 56 | INV-1055 | Basecamp Events | Marketing |
| 57 | INV-1056 | Cloudline Software | Software |
| 58 | INV-1057 | NovaTech Solutions | Software |
| 59 | INV-1058 | Clearview Data Systems | Software |
| 60 | INV-1059 | Basecamp Events | Marketing |
| 61 | INV-1060 | Horizon IT Services | Software |
| 62 | INV-1061 | Atlas Hardware Co. | Hardware |
| 63 | INV-1062 | Forge & Frame Creative | Marketing |
| 64 | INV-1063 | Meridian Travel Co. | Travel |
| 65 | INV-1064 | Meridian Travel Co. | Travel |
| 66 | INV-1065 | Cloudline Software | Software |
| 67 | INV-1066 | Redstone Marketing | Marketing |
| 68 | INV-1067 | Horizon IT Services | Software |
| 69 | INV-1068 | Cloudline Software | Software |
| 70 | INV-1069 | NovaTech Solutions | Software |
| 71 | INV-1070 | Apex Office Supply | Office Supplies |
| 72 | INV-1071 | Redstone Marketing | Marketing |
| 73 | INV-1072 | NovaTech Solutions | Software |
| 74 | INV-1073 | Summit Consulting Group | Consulting |
| 75 | INV-1074 | Atlas Hardware Co. | Hardware |
| 76 | INV-1075 | BrightPath Analytics | Software |
| 77 | INV-1076 | Clearview Data Systems | Software |
| 78 | INV-1077 | Meridian Travel Co. | Travel |
| 79 | INV-1078 | Pinecrest Staffing | Consulting |
| 80 | INV-1079 | Meridian Travel Co. | Travel |
| 81 | INV-1080 | Greenfield Facilities | Office Supplies |
| 82 | INV-1081 | Keystone Legal Advisors | Consulting |
| 83 | INV-1082 | Apex Office Supply | Office Supplies |
| 84 | INV-1083 | Cloudline Software | Software |
| 85 | INV-1084 | Meridian Travel Co. | Travel |
| 86 | INV-1085 | Horizon IT Services | Software |
| 87 | INV-1086 | Cloudline Software | Software |
| 88 | INV-1087 | Apex Office Supply | Office Supplies |
| 89 | INV-1088 | Pinecrest Staffing | Consulting |
| 90 | INV-1089 | NovaTech Solutions | Software |
| 91 | INV-1090 | Meridian Travel Co. | Travel |
| 92 | INV-1091 | Redstone Marketing | Marketing |
| 93 | INV-1092 | Cloudline Software | Software |
| 94 | INV-1093 | Cloudline Software | Software |
| 95 | INV-1094 | BrightPath Analytics | Software |
| 96 | INV-1095 | Redstone Marketing | Marketing |
| 97 | INV-1096 | BrightPath Analytics | Software |
| 98 | INV-1097 | Redstone Marketing | Marketing |
| 99 | INV-1098 | Cloudline Software | Software |
| 100 | INV-1099 | Meridian Travel Co. | Travel |
| 101 | INV-1100 | Meridian Travel Co. | Travel |
| 102 | INV-1101 | Forge & Frame Creative | Marketing |
| 103 | INV-1102 | Atlas Hardware Co. | Hardware |
| 104 | INV-1103 | NovaTech Solutions | Software |
| 105 | INV-1104 | Meridian Travel Co. | Travel |
| 106 | INV-1105 | NovaTech Solutions | Software |
| 107 | INV-1106 | Pinecrest Staffing | Consulting |
| 108 | INV-1107 | Basecamp Events | Marketing |
| 109 | INV-1108 | Redstone Marketing | Marketing |
| 110 | INV-1109 | NovaTech Solutions | Software |
| 111 | INV-1110 | Horizon IT Services | Software |
| 112 | INV-1111 | Pinecrest Staffing | Consulting |
| 113 | INV-1112 | NovaTech Solutions | Software |
| 114 | INV-1113 | Cloudline Software | Software |
| 115 | INV-1114 | Meridian Travel Co. | Travel |
| 116 | INV-1115 | Clearview Data Systems | Software |
| 117 | INV-1116 | Cloudline Software | Software |
| 118 | INV-1117 | Clearview Data Systems | Software |
| 119 | INV-1118 | Greenfield Facilities | Office Supplies |
| 120 | INV-1119 | Cloudline Software | Software |
| 121 | INV-1120 | Horizon IT Services | Software |
| 122 | INV-1121 | Meridian Travel Co. | Travel |
| 123 | INV-1122 | Redstone Marketing | Marketing |
| 124 | INV-1123 | Redstone Marketing | Marketing |
| 125 | INV-1124 | NovaTech Solutions | Software |
| 126 | INV-1125 | Cloudline Software | Software |
| 127 | INV-1126 | Meridian Travel Co. | Travel |
| 128 | INV-1127 | Horizon IT Services | Software |
| 129 | INV-1128 | Forge & Frame Creative | Marketing |
| 130 | INV-1129 | Cloudline Software | Software |
| 131 | INV-1130 | BrightPath Analytics | Software |
| 132 | INV-1131 | Keystone Legal Advisors | Consulting |
| 133 | INV-1132 | BrightPath Analytics | Software |
| 134 | INV-1133 | Meridian Travel Co. | Travel |
| 135 | INV-1134 | NovaTech Solutions | Software |
| 136 | INV-1135 | Cloudline Software | Software |
| 137 | INV-1136 | Greenfield Facilities | Office Supplies |
| 138 | INV-1137 | Meridian Travel Co. | Travel |
| 139 | INV-1138 | Apex Office Supply | Office Supplies |
| 140 | INV-1139 | Pinecrest Staffing | Consulting |
| 141 | INV-1140 | Pinecrest Staffing | Consulting |
| 142 | INV-1141 | Cloudline Software | Software |
| 143 | INV-1142 | NovaTech Solutions | Software |
| 144 | INV-1143 | Greenfield Facilities | Office Supplies |
| 145 | INV-1144 | Clearview Data Systems | Software |
| 146 | INV-1145 | Apex Office Supply | Office Supplies |
| 147 | INV-1146 | Cloudline Software | Software |
| 148 | INV-1147 | Summit Consulting Group | Consulting |
| 149 | INV-1148 | NovaTech Solutions | Software |
| 150 | INV-1149 | Greenfield Facilities | Office Supplies |
| 151 | INV-1150 | Greenfield Facilities | Office Supplies |
| 152 |
Scroll to explore the table, then sort or filter by column as needed.
Hints
Your Answer
Question
A colleague's formula divides the total spend by the count of invoices in a category — but for a category with zero invoices, it hits a #DIV/0! error. What does =IFERROR(SUM(E2:E10)/0, "N/A") return?
Dataset
Vendor Spend Tracker (150 rows total)
Download CSV| Row numbers | A | B | C | D |
|---|---|---|---|---|
| Header row | ||||
| 2 | INV-1001 | Cloudline Software | Software | $12,500.00 |
| 3 | INV-1002 | Apex Office Supply | Office Supplies | $487.50 |
| 4 | INV-1003 | Summit Consulting Group | Consulting | $18,750.00 |
| 5 | INV-1004 | Meridian Travel Co. | Travel | $3,200.00 |
| 6 | INV-1005 | Forge & Frame Creative | Marketing | $7,600.00 |
| 7 | INV-1006 | NovaTech Solutions | Software | $9,800.00 |
| 8 | INV-1007 | Atlas Hardware Co. | Hardware | $2,150.00 |
| 9 | INV-1008 | Clearview Data Systems | Software | $15,300.00 |
| 10 | INV-1009 | Redstone Marketing | Marketing | $4,250.00 |
| 11 | INV-1010 | Keystone Legal Advisors | Consulting | $8,900.00 |
| 12 | INV-1011 | Cloudline Software | Software | $8,500.00 |
| 13 | INV-1012 | Basecamp Events | Marketing | $8,256.80 |
| 14 | INV-1013 | Apex Office Supply | Office Supplies | $713.88 |
| 15 | INV-1014 | BrightPath Analytics | Software | $2,645.33 |
| 16 | INV-1015 | Meridian Travel Co. | Travel | $4,702.01 |
| 17 | INV-1016 | Clearview Data Systems | Software | $3,400.74 |
| 18 | INV-1017 | Apex Office Supply | Office Supplies | $531.83 |
| 19 | INV-1018 | Summit Consulting Group | Consulting | $1,847.86 |
| 20 | INV-1019 | Cloudline Software | Software | $7,800.00 |
| 21 | INV-1020 | Atlas Hardware Co. | Hardware | $2,524.82 |
| 22 | INV-1021 | Meridian Travel Co. | Travel | $2,934.55 |
| 23 | INV-1022 | Atlas Hardware Co. | Hardware | $2,912.75 |
| 24 | INV-1023 | Atlas Hardware Co. | Hardware | $4,124.04 |
| 25 | INV-1024 | Apex Office Supply | Office Supplies | $672.77 |
| 26 | INV-1025 | Redstone Marketing | Marketing | $5,371.63 |
| 27 | INV-1026 | Clearview Data Systems | Software | $3,796.96 |
| 28 | INV-1027 | Horizon IT Services | Software | $1,773.30 |
| 29 | INV-1028 | Basecamp Events | Marketing | $4,601.68 |
| 30 | INV-1029 | Redstone Marketing | Marketing | $5,414.85 |
| 31 | INV-1030 | BrightPath Analytics | Software | $2,704.87 |
| 32 | INV-1031 | Basecamp Events | Marketing | $2,351.63 |
| 33 | INV-1032 | Cloudline Software | Software | $9,200.00 |
| 34 | INV-1033 | Clearview Data Systems | Software | $4,086.27 |
| 35 | INV-1034 | Meridian Travel Co. | Travel | $1,642.50 |
| 36 | INV-1035 | Cloudline Software | Software | $2,867.94 |
| 37 | INV-1036 | Horizon IT Services | Software | $4,586.87 |
| 38 | INV-1037 | BrightPath Analytics | Software | $2,679.33 |
| 39 | INV-1038 | Cloudline Software | Software | $2,284.90 |
| 40 | INV-1039 | Horizon IT Services | Software | $3,224.17 |
| 41 | INV-1040 | Apex Office Supply | Office Supplies | $604.96 |
| 42 | INV-1041 | Summit Consulting Group | Consulting | $9,500.00 |
| 43 | INV-1042 | Clearview Data Systems | Software | $3,871.90 |
| 44 | INV-1043 | Forge & Frame Creative | Marketing | $5,726.55 |
| 45 | INV-1044 | NovaTech Solutions | Software | $3,596.33 |
| 46 | INV-1045 | Meridian Travel Co. | Travel | $5,657.73 |
| 47 | INV-1046 | Cloudline Software | Software | $8,000.00 |
| 48 | INV-1047 | Apex Office Supply | Office Supplies | $396.69 |
| 49 | INV-1048 | Apex Office Supply | Office Supplies | $523.99 |
| 50 | INV-1049 | Pinecrest Staffing | Consulting | $5,843.41 |
| 51 | INV-1050 | Clearview Data Systems | Software | $5,091.38 |
| 52 | INV-1051 | BrightPath Analytics | Software | $6,200.00 |
| 53 | INV-1052 | Keystone Legal Advisors | Consulting | $10,496.53 |
| 54 | INV-1053 | Cloudline Software | Software | $3,873.77 |
| 55 | INV-1054 | NovaTech Solutions | Software | $2,131.07 |
| 56 | INV-1055 | Basecamp Events | Marketing | $4,659.43 |
| 57 | INV-1056 | Cloudline Software | Software | $7,500.00 |
| 58 | INV-1057 | NovaTech Solutions | Software | $3,255.52 |
| 59 | INV-1058 | Clearview Data Systems | Software | $2,889.22 |
| 60 | INV-1059 | Basecamp Events | Marketing | $2,943.88 |
| 61 | INV-1060 | Horizon IT Services | Software | $3,917.25 |
| 62 | INV-1061 | Atlas Hardware Co. | Hardware | $2,958.71 |
| 63 | INV-1062 | Forge & Frame Creative | Marketing | $5,190.48 |
| 64 | INV-1063 | Meridian Travel Co. | Travel | $3,800.00 |
| 65 | INV-1064 | Meridian Travel Co. | Travel | $3,248.96 |
| 66 | INV-1065 | Cloudline Software | Software | $6,800.00 |
| 67 | INV-1066 | Redstone Marketing | Marketing | $4,583.65 |
| 68 | INV-1067 | Horizon IT Services | Software | $4,154.73 |
| 69 | INV-1068 | Cloudline Software | Software | $1,994.85 |
| 70 | INV-1069 | NovaTech Solutions | Software | $5,988.79 |
| 71 | INV-1070 | Apex Office Supply | Office Supplies | $701.90 |
| 72 | INV-1071 | Redstone Marketing | Marketing | $1,522.67 |
| 73 | INV-1072 | NovaTech Solutions | Software | $8,100.00 |
| 74 | INV-1073 | Summit Consulting Group | Consulting | $33,000.00 |
| 75 | INV-1074 | Atlas Hardware Co. | Hardware | $3,618.53 |
| 76 | INV-1075 | BrightPath Analytics | Software | $5,484.82 |
| 77 | INV-1076 | Clearview Data Systems | Software | $2,190.73 |
| 78 | INV-1077 | Meridian Travel Co. | Travel | $4,915.98 |
| 79 | INV-1078 | Pinecrest Staffing | Consulting | $5,337.06 |
| 80 | INV-1079 | Meridian Travel Co. | Travel | $5,217.40 |
| 81 | INV-1080 | Greenfield Facilities | Office Supplies | $4,199.01 |
| 82 | INV-1081 | Keystone Legal Advisors | Consulting | $7,880.94 |
| 83 | INV-1082 | Apex Office Supply | Office Supplies | $738.04 |
| 84 | INV-1083 | Cloudline Software | Software | $9,500.00 |
| 85 | INV-1084 | Meridian Travel Co. | Travel | $3,706.27 |
| 86 | INV-1085 | Horizon IT Services | Software | $3,934.09 |
| 87 | INV-1086 | Cloudline Software | Software | $2,463.38 |
| 88 | INV-1087 | Apex Office Supply | Office Supplies | $404.67 |
| 89 | INV-1088 | Pinecrest Staffing | Consulting | $1,909.04 |
| 90 | INV-1089 | NovaTech Solutions | Software | $2,885.01 |
| 91 | INV-1090 | Meridian Travel Co. | Travel | $5,922.08 |
| 92 | INV-1091 | Redstone Marketing | Marketing | $3,693.48 |
| 93 | INV-1092 | Cloudline Software | Software | $4,986.06 |
| 94 | INV-1093 | Cloudline Software | Software | $31,500.00 |
| 95 | INV-1094 | BrightPath Analytics | Software | $4,248.05 |
| 96 | INV-1095 | Redstone Marketing | Marketing | $3,264.04 |
| 97 | INV-1096 | BrightPath Analytics | Software | $5,977.55 |
| 98 | INV-1097 | Redstone Marketing | Marketing | $3,214.26 |
| 99 | INV-1098 | Cloudline Software | Software | $8,200.00 |
| 100 | INV-1099 | Meridian Travel Co. | Travel | $2,709.54 |
| 101 | INV-1100 | Meridian Travel Co. | Travel | $3,516.17 |
| 102 | INV-1101 | Forge & Frame Creative | Marketing | $3,122.47 |
| 103 | INV-1102 | Atlas Hardware Co. | Hardware | $4,530.21 |
| 104 | INV-1103 | NovaTech Solutions | Software | $4,352.17 |
| 105 | INV-1104 | Meridian Travel Co. | Travel | $3,137.30 |
| 106 | INV-1105 | NovaTech Solutions | Software | $4,559.89 |
| 107 | INV-1106 | Pinecrest Staffing | Consulting | $7,400.00 |
| 108 | INV-1107 | Basecamp Events | Marketing | $2,724.75 |
| 109 | INV-1108 | Redstone Marketing | Marketing | $3,957.64 |
| 110 | INV-1109 | NovaTech Solutions | Software | $2,398.15 |
| 111 | INV-1110 | Horizon IT Services | Software | $5,015.14 |
| 112 | INV-1111 | Pinecrest Staffing | Consulting | $30,500.00 |
| 113 | INV-1112 | NovaTech Solutions | Software | $3,646.25 |
| 114 | INV-1113 | Cloudline Software | Software | $5,200.86 |
| 115 | INV-1114 | Meridian Travel Co. | Travel | $1,878.57 |
| 116 | INV-1115 | Clearview Data Systems | Software | $4,287.78 |
| 117 | INV-1116 | Cloudline Software | Software | $5,505.30 |
| 118 | INV-1117 | Clearview Data Systems | Software | $4,658.66 |
| 119 | INV-1118 | Greenfield Facilities | Office Supplies | $5,042.80 |
| 120 | INV-1119 | Cloudline Software | Software | $7,000.00 |
| 121 | INV-1120 | Horizon IT Services | Software | $3,893.42 |
| 122 | INV-1121 | Meridian Travel Co. | Travel | $5,864.21 |
| 123 | INV-1122 | Redstone Marketing | Marketing | $3,920.27 |
| 124 | INV-1123 | Redstone Marketing | Marketing | $4,600.00 |
| 125 | INV-1124 | NovaTech Solutions | Software | $1,602.74 |
| 126 | INV-1125 | Cloudline Software | Software | $5,250.09 |
| 127 | INV-1126 | Meridian Travel Co. | Travel | $4,417.14 |
| 128 | INV-1127 | Horizon IT Services | Software | $5,900.00 |
| 129 | INV-1128 | Forge & Frame Creative | Marketing | $4,618.54 |
| 130 | INV-1129 | Cloudline Software | Software | $8,800.00 |
| 131 | INV-1130 | BrightPath Analytics | Software | $4,003.25 |
| 132 | INV-1131 | Keystone Legal Advisors | Consulting | $11,892.88 |
| 133 | INV-1132 | BrightPath Analytics | Software | $2,800.34 |
| 134 | INV-1133 | Meridian Travel Co. | Travel | $4,365.68 |
| 135 | INV-1134 | NovaTech Solutions | Software | $2,264.09 |
| 136 | INV-1135 | Cloudline Software | Software | $5,344.04 |
| 137 | INV-1136 | Greenfield Facilities | Office Supplies | $1,733.29 |
| 138 | INV-1137 | Meridian Travel Co. | Travel | $2,251.07 |
| 139 | INV-1138 | Apex Office Supply | Office Supplies | $367.30 |
| 140 | INV-1139 | Pinecrest Staffing | Consulting | $3,235.55 |
| 141 | INV-1140 | Pinecrest Staffing | Consulting | $4,538.25 |
| 142 | INV-1141 | Cloudline Software | Software | $7,200.00 |
| 143 | INV-1142 | NovaTech Solutions | Software | $2,487.53 |
| 144 | INV-1143 | Greenfield Facilities | Office Supplies | $4,398.73 |
| 145 | INV-1144 | Clearview Data Systems | Software | $4,282.05 |
| 146 | INV-1145 | Apex Office Supply | Office Supplies | $300.36 |
| 147 | INV-1146 | Cloudline Software | Software | $9,000.00 |
| 148 | INV-1147 | Summit Consulting Group | Consulting | $4,697.90 |
| 149 | INV-1148 | NovaTech Solutions | Software | $2,613.37 |
| 150 | INV-1149 | Greenfield Facilities | Office Supplies | $4,097.38 |
| 151 | INV-1150 | Greenfield Facilities | Office Supplies | $1,846.11 |
| 152 |
Scroll to explore the table, then sort or filter by column as needed.
Hints
Your Answer
Want more practice?
Test Me mode randomizes exercises across all formulas without telling you which formula to use.