Excel formula that does not perform a calculation when cell values are 0 or blank

I have an Excel file. Cells in columns A and B usually contain numerical values but sometimes are blank or sometimes have a value of 0.  On each row, in column C, I am dividing B by A.  To avoid getting division errors, I need a formula that I can copy down column C that will skip over a row when a value in cell A or B on a given row is either blank or 0.
dbfromnewjerseyAsked:
Who is Participating?
 
Kent FichtnerInformation Technology Systems SupervisorCommented:
You could also try this:

=IF(OR(ISBLANK(A1),ISBLANK(B1),A1=0),0,B1/A1)
0
 
Kent FichtnerInformation Technology Systems SupervisorCommented:
=IF(A1=0,0,B1/A1)

That should work.
0
 
Santosh GuptaCommented:
Try

=IF(ISERROR(A1/B1),0,A1/B1)
0
 
Saqib Husain, SyedEngineerCommented:
=IF(A1=0,"",B1/A1)
0
 
Naresh PatelTraderCommented:
Try this
=IFERROR(B1/A1,"")

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.