# Solved: Excel 2007 - If statements and "#value"



## ricuelo (Jan 10, 2009)

hi, i think my question is fairly simple. i need to write an IF statement that returns a 0 if a certain cell has either error message. #N/A N/A or #VALUE! or really any other error message the excel can come up with. I've had it in previous spreadsheets but lost them and now desperately need to do it again.

regards


----------



## slurpee55 (Oct 20, 2004)

=IF(ISERROR(insert the formula you have already written here),0,insert the formula you have already written here)
That will give you either the the value calculated by your formula or a 0. An alternative would be to have it show a null (nothing) instead of a zero, using
=IF(ISERROR(insert the formula you have already written here),"",insert the formula you have already written here)
Note that "insert the formula you have already written here" is not what you actually have there - I just used that as a placeholder.


----------

