Doubt in Excel formula

gopdeep

Board Regular
Joined
Apr 24, 2012
Messages
94
If am having formula like below in "F6" cell, it is showing result as expected. But if both D6 & E6 cells are blank it is showing like #DIV/0! - here pls let me know that how can i hide the formula if it doesn't return values.
Code:
=D6/(D6+E6)*100


:rolleyes:
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi... if D6 and D7 are provided with "0" then the resultant value should be 8... however formula =IF(D6+E6=0,"",D6/(D6+E6)*100) is showing empty cell, likewise formula =IF(AND(D6="",E6=""),"",D6/(D6+E6)*100) showing #DIV/0! as result. However i would like to get "0" as my result and also formula should be hidded if there is nothing? pls help me
</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
 
Upvote 0
Hi... if D6 and D7 are provided with "0" then the resultant value should be 8... however formula =IF(D6+E6=0,"",D6/(D6+E6)*100) is showing empty cell, likewise formula =IF(AND(D6="",E6=""),"",D6/(D6+E6)*100) showing #DIV/0! as result. However i would like to get "0" as my result and also formula should be hidded if there is nothing? pls help me
</SPAN>

<TBODY>
</TBODY>

Try this: And also lookup the If function and And function in Excel to help you out.

=if(and(D6="",E6=""),"",if(D6=0,0,if(and(D6>0,E6<>"",D6/(D6+E6)*100))
 
Upvote 0

Forum statistics

Threads
1,206,754
Messages
6,074,750
Members
446,082
Latest member
fgiron83

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