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.
Who is Participating?
Kent FichtnerInformation Technology Systems SupervisorCommented:
You could also try this:

Kent FichtnerInformation Technology Systems SupervisorCommented:

That should work.
Santosh GuptaCommented:

Saqib Husain, SyedEngineerCommented:
Naresh PatelTraderCommented:
Try this

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.