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.
Featured Post
Quotables
If a man will begin with certainties, he shall end in doubts; but if he will be content to begin with doubts he shall end in certainties. Continue reading
Recent Posts
How to Avoid Divide by Zero Errors in Spreadsheets
Reply
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.
- At least in Google Docs. ↩