---
title: "Avoid #DIV/0! with IFERROR | PracticeExcel"
description: "Practice IFERROR in a live spreadsheet: show 0 instead of #DIV/0! when dividing by zero."
canonical_url: "https://practiceexcelonline.com/practice/iferror/iferror-div0"
locale: en
meta:
  "og:description": "Practice IFERROR in a live spreadsheet: show 0 instead of #DIV/0! when dividing by zero."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~QXZvaWQgI0RJVi8wISB3aXRoIElGRVJST1I%2Cdescription_~UHJhY3RpY2UgSUZFUlJPUiBpbiBhIGxpdmUgc3ByZWFkc2hlZXQ6IHNob3cgMCBpbnN0ZWFkIG9mICNESVYvMCEgd2hlbiBkaXZpZGluZyBieSB6ZXJvLg%2Ceyebrow_IFERROR%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIiwiRCJdLCJyb3dzIjpbeyJuIjoxLCJjZWxscyI6WyJQcm9kdWN0IiwiUmV2ZW51ZSIsIlVuaXRzIHNvbGQiLCJQcmljZSBwZXIgdW5pdCJdfSx7Im4iOjIsImNlbGxzIjpbIkRlc2sgbGFtcCIsIjAiLCIwIiwiIl19XSwidGFyZ2V0IjpbMSwzXX19%2Cp_Ii9wcmFjdGljZS9pZmVycm9yL2lmZXJyb3ItZGl2MCI%2Cs_NHZbpVdMuaSmBzEv.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Avoid #DIV/0! with IFERROR | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~QXZvaWQgI0RJVi8wISB3aXRoIElGRVJST1I%2Cdescription_~UHJhY3RpY2UgSUZFUlJPUiBpbiBhIGxpdmUgc3ByZWFkc2hlZXQ6IHNob3cgMCBpbnN0ZWFkIG9mICNESVYvMCEgd2hlbiBkaXZpZGluZyBieSB6ZXJvLg%2Ceyebrow_IFERROR%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIiwiRCJdLCJyb3dzIjpbeyJuIjoxLCJjZWxscyI6WyJQcm9kdWN0IiwiUmV2ZW51ZSIsIlVuaXRzIHNvbGQiLCJQcmljZSBwZXIgdW5pdCJdfSx7Im4iOjIsImNlbGxzIjpbIkRlc2sgbGFtcCIsIjAiLCIwIiwiIl19XSwidGFyZ2V0IjpbMSwzXX19%2Cp_Ii9wcmFjdGljZS9pZmVycm9yL2lmZXJyb3ItZGl2MCI%2Cs_NHZbpVdMuaSmBzEv.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.

Next with premium:**FILTER****SORT and UNIQUE**

It comes up in this mock test: [**Excel assessment (Indeed format)**](https://practiceexcelonline.com/tests/indeed-excel-assessment)

[**See plans, from $5/month**](https://practiceexcelonline.com/pricing) [**Already premium? Sign in**](https://practiceexcelonline.com/login?next=/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/practice/iferror/iferror-div0#webpage","description":"Practice IFERROR in a live spreadsheet: show 0 instead of #DIV/0! when dividing by zero.","name":"Avoid #DIV/0! with IFERROR","url":"https://practiceexcelonline.com/practice/iferror/iferror-div0","@type":["WebPage","FAQPage"],"breadcrumb":{"@id":"https://practiceexcelonline.com/practice/iferror/iferror-div0#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"mainEntity":[{"@id":"https://practiceexcelonline.com/practice/iferror/iferror-div0#/schema/question/1"}],"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/practice/iferror/iferror-div0"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/practice/iferror/iferror-div0#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Excel practice exercises","item":"https://practiceexcelonline.com/practice","position":2},{"@type":"ListItem","name":"IFERROR","item":"https://practiceexcelonline.com/practice/iferror","position":3},{"@type":"ListItem","name":"Avoid #DIV/0! with IFERROR","position":4}]},{"@id":"https://practiceexcelonline.com/practice/iferror/iferror-div0#/schema/question/1","@type":"Question","inLanguage":"en-US","name":"How do I get rid of #DIV/0! in Excel?","acceptedAnswer":{"@type":"Answer","text":"Wrap the division in IFERROR, for example =IFERROR(B2/C2,0), or test the divisor first: =IF(C2=0,0,B2/C2)."}},{"@id":"https://practiceexcelonline.com/practice/iferror/iferror-div0#/schema/learning-resource/1","@type":"LearningResource","description":"Practice IFERROR in a live spreadsheet: show 0 instead of #DIV/0! when dividing by zero.","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.
