# help with nested if statement....

#### smilesci

##### New Member
Here is my current formula:
=IF(AND(((D16-K16)/K16*100)>-0.5,((D16-K16)/K16*100)<0.5),0,(D16-K16)/K16*100)

I need an additional condition on top of this that states if K16=0, to give me a value of zero in the cell and disregard the rest of the statement. I cannot figure out how to get an addition OR statement added to this formula. Can anyone help?

Thanks!
Meg

### Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
=IF(K16=0,0,IF(AND(((D16-K16)/K16*100)>-0.5,((D16-K16)/K16*100)<0.5),0,(D16-K16)/K16*100))

Hope that helps!

Welcome to the board!

Just add IF(K16=0,0, rest of formula) around the formula you posted for:

=IF(K16=0,0,IF(AND(((D16-K16)/K16*100)>-0.5,((D16-K16)/K16*100)<0.5),0,(D16-K16)/K16*100))

Edit: Too slow for Taz

You could shorten this a bit with
=IF(K16,IF(ABS((D16-K16)/K16)<0.05,0,(D16-K16)/K16*100),0)

still playing
=IF(K16,IF(ABS((D16/K16)-1)<0.005,0,((D16/K16)-1)*100),0)

Thanks!! You guys rock!

Replies
1
Views
497
Replies
5
Views
290
Replies
1
Views
338
Replies
0
Views
268
Replies
4
Views
488

1,220,955
Messages
6,157,041
Members
451,394
Latest member
indrajeet_rajput

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