---
title: "Avoid #DIV/0! with IFERROR in Google Sheets | PracticeExcel"
description: "The lamp has not sold yet, so B2/C2 gives #DIV/0!. In D2, wrap B2/C2 in IFERROR to show 0 instead."
canonical_url: "https://practiceexcelonline.com/sheets/practice/iferror/iferror-div0"
locale: en
meta:
  "og:description": "The lamp has not sold yet, so B2/C2 gives #DIV/0!. In D2, wrap B2/C2 in IFERROR to show 0 instead."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~QXZvaWQgI0RJVi8wISB3aXRoIElGRVJST1IgaW4gR29vZ2xlIFNoZWV0cw%2Cdescription_~VGhlIGxhbXAgaGFzIG5vdCBzb2xkIHlldCwgc28gQjIvQzIgZ2l2ZXMgI0RJVi8wIS4gSW4gRDIsIHdyYXAgQjIvQzIgaW4gSUZFUlJPUiB0byBzaG93IDAgaW5zdGVhZC4%2Ceyebrow_IFERROR%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIiwiRCJdLCJyb3dzIjpbeyJuIjoxLCJjZWxscyI6WyJQcm9kdWN0IiwiUmV2ZW51ZSIsIlVuaXRzIHNvbGQiLCJQcmljZSBwZXIgdW5pdCJdfSx7Im4iOjIsImNlbGxzIjpbIkRlc2sgbGFtcCIsIjAiLCIwIiwiIl19XSwidGFyZ2V0IjpbMSwzXX19%2Cp_Ii9zaGVldHMvcHJhY3RpY2UvaWZlcnJvci9pZmVycm9yLWRpdjAi%2Cs_1LV6DWZI56dTZDmE.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Avoid #DIV/0! with IFERROR in Google Sheets | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~QXZvaWQgI0RJVi8wISB3aXRoIElGRVJST1IgaW4gR29vZ2xlIFNoZWV0cw%2Cdescription_~VGhlIGxhbXAgaGFzIG5vdCBzb2xkIHlldCwgc28gQjIvQzIgZ2l2ZXMgI0RJVi8wIS4gSW4gRDIsIHdyYXAgQjIvQzIgaW4gSUZFUlJPUiB0byBzaG93IDAgaW5zdGVhZC4%2Ceyebrow_IFERROR%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIiwiRCJdLCJyb3dzIjpbeyJuIjoxLCJjZWxscyI6WyJQcm9kdWN0IiwiUmV2ZW51ZSIsIlVuaXRzIHNvbGQiLCJQcmljZSBwZXIgdW5pdCJdfSx7Im4iOjIsImNlbGxzIjpbIkRlc2sgbGFtcCIsIjAiLCIwIiwiIl19XSwidGFyZ2V0IjpbMSwzXX19%2Cp_Ii9zaGVldHMvcHJhY3RpY2UvaWZlcnJvci9pZmVycm9yLWRpdjAi%2Cs_1LV6DWZI56dTZDmE.png"
---

> Index of every page on this site: [llms.txt](https://practiceexcelonline.com/llms.txt)

# **Avoid #DIV/0! with IFERROR**

**Premium**

The lamp has not sold yet, so B2/C2 gives #DIV/0!. In D2, wrap B2/C2 in IFERROR to show 0 instead.

D2fx

|  | A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- | --- |
| 1 | Product | Revenue | Units sold | Price per unit |  | |
| 2 | Desk lamp | 0 | 0 |  |  | |
| 3 |  |  |  |  |  | |
| 4 |  |  |  |  |  | |
| 5 |  |  |  |  |  | |
| 6 |  |  |  |  |  | |
| 7 |  |  |  |  |  | |
| 8 |  |  |  |  |  | |

**Premium lesson**

## **Unlock IFERROR and every other lesson**

This is a premium lesson. Premium lets you solve it and every other lesson, take the timed mock tests, and earn certificates you can share on LinkedIn.

[**See plans, from $5/month**](https://practiceexcelonline.com/pricing) [**Already premium? Sign in**](https://practiceexcelonline.com/login?next=/sheets/practice/iferror/iferror-div0)

Need help?

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://practiceexcelonline.com/#identity","@type":"Organization","name":"PracticeExcel","url":"https://practiceexcelonline.com/","logo":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/#website","@type":"WebSite","inLanguage":"en-US","name":"PracticeExcel","url":"https://practiceexcelonline.com/","alternateName":["Practice Excel Online","PracticeExcelOnline.com"],"publisher":{"@id":"https://practiceexcelonline.com/#identity"},"workTranslation":{"@id":"https://excelopgaver.dk/#website"}},{"@id":"https://practiceexcelonline.com/sheets/practice/iferror/iferror-div0#webpage","@type":"WebPage","description":"The lamp has not sold yet, so B2/C2 gives #DIV/0!. In D2, wrap B2/C2 in IFERROR to show 0 instead.","name":"Avoid #DIV/0! with IFERROR in Google Sheets","url":"https://practiceexcelonline.com/sheets/practice/iferror/iferror-div0","breadcrumb":{"@id":"https://practiceexcelonline.com/sheets/practice/iferror/iferror-div0#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/sheets/practice/iferror/iferror-div0"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/sheets/practice/iferror/iferror-div0#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Google Sheets practice exercises","item":"https://practiceexcelonline.com/sheets","position":2},{"@type":"ListItem","name":"IFERROR","item":"https://practiceexcelonline.com/sheets/practice/iferror","position":3},{"@type":"ListItem","name":"Avoid #DIV/0! with IFERROR in Google Sheets","position":4}]},{"@id":"https://practiceexcelonline.com/sheets/practice/iferror/iferror-div0#/schema/learning-resource/1","@type":"LearningResource","description":"The lamp has not sold yet, so B2/C2 gives #DIV/0!. In D2, wrap B2/C2 in IFERROR to show 0 instead.","educationalLevel":"beginner","isAccessibleForFree":false,"learningResourceType":"exercise","name":"Avoid #DIV/0! with IFERROR","teaches":"IFERROR"},{"@id":"https://practiceexcelonline.com/#logo","@type":"ImageObject","caption":"PracticeExcel","contentUrl":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png"}]}
```

## Sitemap

See the full [sitemap](https://practiceexcelonline.com/sitemap.md) for all pages.
