tpheath,
The formula you have is not an average - it's a ratio of unplanned averages to planned averages. If outages = 0, then that is why you have an error as you cannot divide by zero. If the ratio is what you want, then oldchippy's advice will work well.
I would recommend removing error...