Solved

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

Posted on 2014-04-15
5
242 Views
Last Modified: 2014-05-09
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
Comment
Question by:dbfromnewjersey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 4

Assisted Solution

by:Kent Fichtner
Kent Fichtner earned 120 total points
ID: 40001611
=IF(A1=0,0,B1/A1)

That should work.
0
 
LVL 4

Accepted Solution

by:
Kent Fichtner earned 120 total points
ID: 40001616
You could also try this:

=IF(OR(ISBLANK(A1),ISBLANK(B1),A1=0),0,B1/A1)
0
 
LVL 13

Assisted Solution

by:Santosh Gupta
Santosh Gupta earned 60 total points
ID: 40001619
Try

=IF(ISERROR(A1/B1),0,A1/B1)
0
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 60 total points
ID: 40001628
=IF(A1=0,"",B1/A1)
0
 
LVL 8

Assisted Solution

by:Naresh Patel
Naresh Patel earned 60 total points
ID: 40001745
Try this
=IFERROR(B1/A1,"")

Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question