[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

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.
0
dbfromnewjersey
Asked:
dbfromnewjersey
5 Solutions
 
Kent FichtnerInformation Technology Systems SupervisorCommented:
=IF(A1=0,0,B1/A1)

That should work.
0
 
Kent FichtnerInformation Technology Systems SupervisorCommented:
You could also try this:

=IF(OR(ISBLANK(A1),ISBLANK(B1),A1=0),0,B1/A1)
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now