If statement getting out of hand

dsdavis6

New Member
Joined
Aug 11, 2011
Messages
7
Hi,

I am trying to come up with a formula that does a couple of sums from cells, and if its more than .26 or less than -.26 displays one thing and anything in the middle displays another. This is my attempt but I can't see quite what is wrong with it. Any help would be greatly appreciated.

IF(AND(IF(K2="Home",AA2-AB2+L2,AB2-AA2+L2)>0.25,(IF(K2="Home",AA2-AB2+L2,AB2-AA2+L2)<-.25,"full","void")))
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi there,

You need to check to see if it's either greater than 0.25 or less than -0.25, so you'll need an OR not and AND.

Code:
=if(or(  (if(K2="Home",AA2-AB2+L2,AB2-AA2+L2) > 0.25), (if(K2="Home",AA2-AB2+l2,AB2-AA2+L2)<-0.25)), "Full",Void)

I'm sure it can be rewritten more succinctly but that should do the trick. (Untested)
 
Upvote 0
Hi there,

You need to check to see if it's either greater than 0.25 or less than -0.25, so you'll need an OR not and AND.

Code:
=if(or(  (if(K2="Home",AA2-AB2+L2,AB2-AA2+L2) > 0.25), (if(K2="Home",AA2-AB2+l2,AB2-AA2+L2)<-0.25)), "Full",Void)

I'm sure it can be rewritten more succinctly but that should do the trick. (Untested)

That has worked. Thank you very much!
 
Upvote 0

Forum statistics

Threads
1,214,618
Messages
6,120,544
Members
448,970
Latest member
kennimack

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