Solved

IF #div/0! replace with 0

Posted on 2015-02-04
4
110 Views
Last Modified: 2015-02-04
How do I edit this formula so it will still return a 0 if F2 = 0 as well as G2?

=IF(G2=0," ",(G2/F2))
0
Comment
Question by:robmarr700
4 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40588563
=IF(OR(f2=0,G2=0),0,(G2/F2))
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 40588578
For this case

=if(f2=0,0,g2/f2)

should be sufficient
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40588614
Yes, if G2 was 0, then the formula G2/F2 would yield 0 because 0 divided by any number equals 0.  So as was already mentioned by ssaqibh, all you really need is:
=IF(F2=0,0,G2/F2)
0
 
LVL 5

Expert Comment

by:Hakan Yılmaz
ID: 40588702
If you just want to see zero instead #div/0!, you may use, =IFERROR(G2/F2,0)
But this will hide other errors too.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now