DIV/0 and Zero Value Hide Formula Help

nhbartos

Board Regular
Joined
May 23, 2015
Messages
148
Hi folks,

I am using this formula in G2.

=$F2/$C2*100

...to get a percentage.

When one or both F2 and C2 are blank, I want a blank in G2.
I don't want the DIV/0, and got rid of that, but then there was a "0%" in the cell.

Is there a formula that will not show any value unless F2 and C2 have data?
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Yes. Try:
Code:
=IF(AND(F2<>0,C2<>0,F2/C2,"")
By the way, you do not need to multiply by 100. You could just Format as a Percentage.
 
Last edited:
Upvote 0
you can try this shorter version to get rid of 0% and DIV/0 error.

=IF(C2*F2,F2/C2,"")
 
Upvote 0

Forum statistics

Threads
1,215,543
Messages
6,125,429
Members
449,223
Latest member
Narrian

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