# Simple excel problem

**URL:** https://boards.straightdope.com/t/simple-excel-problem/472666
**Category:** Factual Questions
**Created:** [November 14, 2008, 4:22am UTC](https://boards.straightdope.com/t/simple-excel-problem/472666 "2008-11-14T04:22:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![scm1001](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@scm1001](https://boards.straightdope.com/u/scm1001)
#### Post date: [November 14, 2008, 4:22am UTC](https://boards.straightdope.com/t/simple-excel-problem/472666/1 "2008-11-14T04:22:22Z")

</div>

Excel novice here.  
I need to have a calculation where not all of the columns have any data in them all the time (depending on how many instance I enter). However some cells have formula that depend on two other cells dividing e.g D2=D4/D5. Is there a way that i can get excel to ignore the 0/0 error that will sometimes arise with empty cells.  
thanks

---

<div class="post-metadata">

### Author: ![Ice\_Cream\_Conquest](https://avatars.discourse-cdn.com/v4/letter/i/e480ec/32.png) [@Ice\_Cream\_Conquest](https://boards.straightdope.com/u/Ice_Cream_Conquest)
#### Post date: [November 14, 2008, 4:29am UTC](https://boards.straightdope.com/t/simple-excel-problem/472666/2 "2008-11-14T04:29:20Z")

</div>

=if(D5=0,0,D4/D5)

---

<div class="post-metadata">

### Author: ![OldGuy](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@OldGuy](https://boards.straightdope.com/u/OldGuy)
#### Post date: [November 14, 2008, 6:29am UTC](https://boards.straightdope.com/t/simple-excel-problem/472666/3 "2008-11-14T06:29:50Z")

</div>

> [@Ice\_Cream\_Conquest](#):
>
> =if(D5=0,0,D4/D5)

Or if you don’t want a zero to appear for 0/0 you can put something else in place of the zero after the comma.

=if(D5=0,“”,D4/D5)

will leave the cell blank if D5 is empty or a zero. But note that either of these formulas will give you a #Value! error if D5 has a space in it instead of being empty.

More complicated

=IF(ISNUMBER(D5),IF(D5\<\>0,D4/D5,“”),“”)

will give you a blank result if D5 is zero or any nonnumeric entry. You can put any other text you prefer between the " marks.

---

<div class="post-metadata">

### Author: ![scm1001](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@scm1001](https://boards.straightdope.com/u/scm1001)
#### Post date: [November 15, 2008, 1:51am UTC](https://boards.straightdope.com/t/simple-excel-problem/472666/4 "2008-11-15T01:51:24Z")

</div>

great thanks! 🙂
