help with nested if statement....

smilesci

New Member
Joined
Jan 18, 2005
Messages
2
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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
How about this?:
=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!
 
Upvote 0
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
 
Upvote 0
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)
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,707
Members
448,981
Latest member
recon11bucks

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