Cell to remain blank if value is 0

tdog72

New Member
Joined
Aug 25, 2015
Messages
13
Good afternoon. I'm looking for some help with an IF statement. My formula is =sum(k2:k13)/sum(j2:j13). If the result of this is zero I want the cell left blank so it will not produce a div/0 error when I link the cell to another spread sheet. Can you help me please?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi,

You can wrap your formula with IFERROR:

Code:
=IFERROR(SUM(K2:K13)/SUM(J2:J13),"")
 
Upvote 0
IFERROR won't return blank for 0 if the problem is not in the denominator. (Say, the sum of K2:K13 was 0, but the sum of J2:J13 was 7)
However referencing a cell with "" will cause a #VALUE ! error if you do math with that result.

In General, you want to check for a 0 denominator:
=IF(SUM(J2:J13),SUM(K2:K13)/SUM(J2:J13),"")

Then you're next formula needs to check for the value in that cell before you do math on it.

But to incorporate that into what you asked:
=IF(SUM(J2:J13),IF(SUM(K2:K13)/SUM(J2:J13)=0,"",SUM(K2:K13)/SUM(J2:J13)),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top