I am trying to carry out a calculation on 2 columns D and M. All formulas need to be copied down beyond the end of the data as it uses dynamic data in another sheet which can fill more rows as required. Sometimes cells in D and M are blank so I need to insert a zero. I have this formula:
=IF(ISBLANK(M10),0,D10/M10)
This produces the right result except where as sometimes happens D10/M10 results in #DIV/0! In this case it should ignore the error and insert a zero. Also sometime D and M need to stay blank when there is data in column A.
I tried:
=IFERROR(IF(ISBLANK(M10),0,D10/M10))
This inserts the zero when D and M are empty but inserts a blank cell where there should be #DIV/0!
What I need is:
If either D10 or M10 are empty, it returns 0 unless A10 is also empty
if D10/M10 would return #DIV/0! it returns a 0
I hope someone can help me combine the two expressions.
Thanks in advance
Simon
=IF(ISBLANK(M10),0,D10/M10)
This produces the right result except where as sometimes happens D10/M10 results in #DIV/0! In this case it should ignore the error and insert a zero. Also sometime D and M need to stay blank when there is data in column A.
I tried:
=IFERROR(IF(ISBLANK(M10),0,D10/M10))
This inserts the zero when D and M are empty but inserts a blank cell where there should be #DIV/0!
What I need is:
If either D10 or M10 are empty, it returns 0 unless A10 is also empty
if D10/M10 would return #DIV/0! it returns a 0
I hope someone can help me combine the two expressions.
Thanks in advance
Simon