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
Solved

IF #div/0! replace with 0

Posted on 2015-02-04
4
114 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel if statement 3 15
How do you check for multiple possibilities in Excel 7 26
EXCEL formula that pulls formatting as well 12 44
Set WorkSheet  not Working 9 38
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

839 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