IF AND Formula

EvansB2

Board Regular
Joined
Nov 25, 2008
Messages
245
Office Version
  1. 365
Platform
  1. Windows
Hi there,

The uploaded example shows a simple set of data and the condition in D2 should be returned as "No" as long as their is a value in cell B2, i.e. above zero, and cell C2 is higher than cell A2. If no value exists in cell B2, then it should return "not applicable". The case might also be that cells C2 and A2 have the same number, if this is the case then D2 should return "Yes"

Any help would be much appreciated.

Ben

Field01Field02Field03Field04
12£2,00035"NO"
 

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.
Is this what you mean?

Code:
=IF(ISBLANK(B2),"Not applicable",IF(AND(B2>0,C2>A2),"NO","YES"))
 
Upvote 0
Another option if B2 can never be negative
Excel Formula:
=IF(B2="","Not applicable",IF(C2>A2,"NO","YES"))
 
Upvote 0
Almost. The formula would benefit from replacing the ISBLANK with if B2 was greater than zero. This is because it is someone else's sheet and all nil value cells have a value, i.e.£0 and are not blank. I don't want to re-format it. Does that makes sense?

Can you show me what the new formula would look like in this instance?

Ben
 
Upvote 0
Can B2 be blank or "", or will it always have a number?
 
Upvote 0
Ok, how about
Excel Formula:
=IF(B2<=0,"Not applicable",IF(C2>A2,"NO","YES"))
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,417
Messages
6,124,783
Members
449,188
Latest member
Hoffk036

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