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

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

IF #div/0! replace with 0

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
robmarr700
Asked:
robmarr700
1 Solution
 
Phillip BurtonCommented:
=IF(OR(f2=0,G2=0),0,(G2/F2))
0
 
Saqib Husain, SyedEngineerCommented:
For this case

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

should be sufficient
0
 
IrogSintaCommented:
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
 
Hakan YılmazTechnical Office MEP EngineerCommented:
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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