# Doubt in Excel formula

#### gopdeep

##### Board Regular
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``

### 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.
Try

=IF(AND(D6="",E6=""),"",D6/(D6+E6)*100)

Hi

To avoid the division by 0 error, try:

Try

=IF(D6+E6=0,"",D6/(D6+E6)*100)

yep... its working

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


<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>

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


<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))

Replies
2
Views
260
Replies
2
Views
309
Replies
7
Views
443
Replies
3
Views
115
Replies
13
Views
558

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.

### Which adblocker are you using?

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

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