If and AND function together

shonu1320

Board Regular
Joined
Mar 10, 2011
Messages
54
I am trying to construct a formula using If and AND function together and needs help with the same.

I want to say IFA5="NO", AND A7>0 and A8>0, then output "Check", Otherwise leave it blank

A5, A7, and A8 also have a If formula nested in them.

It sounds simple and I have done couple of arguments but I am only getting error.

Here are my try's
=IF(A5)="NO",AND(A7>0,A8>0),"CHECK","" I got errors on this formula
OR
=IF(AND(A5="NO",(A7>0,A8>0)),"CHECK","")
This formula said CHECK even when A5 is not equal to NO, said TRUE when both the conditions were true(but I want it to say check instead of true)and said FALSE when IF condition met but AND condition did not meet(I want it to leave the cell blank instead of calling it false.
What am I doing wrong and how can I fix it? Please Help!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Oh My Gosh! It worked perfectly :) Thank you so much for quick reply. I see where I was missing the conditions.
 
Upvote 0
I am trying to construct a formula using If and AND function together and needs help with the same.

I want to say IFA5="NO", AND A7>0 and A8>0, then output "Check", Otherwise leave it blank

A5, A7, and A8 also have a If formula nested in them.

It sounds simple and I have done couple of arguments but I am only getting error.

Here are my try's
=IF(A5)="NO",AND(A7>0,A8>0),"CHECK","" I got errors on this formula
OR
=IF(AND(A5="NO",(A7>0,A8>0)),"CHECK","")
This formula said CHECK even when A5 is not equal to NO, said TRUE when both the conditions were true(but I want it to say check instead of true)and said FALSE when IF condition met but AND condition did not meet(I want it to leave the cell blank instead of calling it false.
What am I doing wrong and how can I fix it? Please Help!
Try it like this...

=IF(AND(A5="NO",A7>0,A8>0),"CHECK","")

Note that if A7 and/or A8 contain TEXT (or formula blanks) then the test for >0 will evaluate to TRUE.

Yo may need/want to also test that the cells contain numbers. Something like this will do that:

=IF(AND(A5="NO",COUNTIF(A7:A8,">0")=2),"CHECK","")
 
Upvote 0
=IF(A5="NO",IF(AND(A7>0,A8>0),"CHECK",""),"")
=IF(AND(A5="NO",A7>0,A8>0),"CHECK","")

"Mechanically", both formulas do the exact same thing.

They just get there from different directions. ;)
 
Upvote 0
A7 and A8 have if formula nested in them to bring value in numbers.

I don't know why both the formulas did not work the same for me.
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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