Musings

Hey, I’m Nick. This site is a showcase for all my work. Sometimes I have good ideas and write them down. You’ll find those nuggets below. I also write about Flex and iOS over at Miscellanea.

Recent Posts

How to Avoid Divide by Zero Errors in Spreadsheets

I recently learned about the magic of the IF statement. No, not as a conditional in a programming language, but as a formula in a spreadsheet.

You know those stupid #DIV/0! errors you get after you’ve masterfully crafted a beautiful spreadsheet that doesn’t have any data in it yet?

This fixes that.

Here’s the syntax1:

=IF(CONDITIONAL, THEN, ELSE)

For example, if you want to display the results of A1 / A2 in A3, you’d use the following formula in A3:

=IF(A2=0, "n/a", A1/A2)

The second parameter (“n/a” above) can be anything you want, and is only displayed if the conditional is true.


  1. At least in Google Docs.
  1. How to Fix Internet Sharing on Snow Leopard Leave a reply