Simple excel problem

Excel novice here.
I need to have a calculation where not all of the columns have any data in them all the time (depending on how many instance I enter). However some cells have formula that depend on two other cells dividing e.g D2=D4/D5. Is there a way that i can get excel to ignore the 0/0 error that will sometimes arise with empty cells.
thanks

=if(D5=0,0,D4/D5)

Or if you don’t want a zero to appear for 0/0 you can put something else in place of the zero after the comma.

=if(D5=0,"",D4/D5)

will leave the cell blank if D5 is empty or a zero. But note that either of these formulas will give you a #Value! error if D5 has a space in it instead of being empty.

More complicated

=IF(ISNUMBER(D5),IF(D5<>0,D4/D5,""),"")

will give you a blank result if D5 is zero or any nonnumeric entry. You can put any other text you prefer between the " marks.

great thanks! :slight_smile: