Nested IF AND formula

livmun

New Member
Joined
Feb 6, 2014
Messages
8
Excel accepts it but the results aren't correct, where it should return one of my 'if true' values, it just returns #VALUE!. I thought it would be pretty simple but I must be overlooking something. Please help.

First of all I am looking at whether or not E2 contains "No – 2014-15 non compliant". Out of those results I want it to return "CAFA 2-Initial Assessment for compliance (will exceed 18 years in 2014-15)" if there's a V in A2 or "CAFA 2-Initial Assessment for compliance (will exceed 18 years in 2014-15) & concurrent with DE" if there's DET in A2.
Here's my attempt:

=IF(AND(AI2="No – 2014-15 non compliant",ISNUMBER(SEARCH("V",A2)),"CAFA 2-Initial Assessment for compliance (will exceed 18 years in 2014-15)"),IF(AND(AI2="No – 2014-15 non compliant",ISNUMBER(SEARCH("DET",A2))),"CAFA 2-Initial Assessment for compliance (will exceed 18 years in 2014-15) & concurrent with DE",""))
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
please restate your problem using simple example

if E2="abc" and A2 contains a "v" anywhere then "bingo" or if E2 = "abc" and A2 contains a DET" anywhere...........
 
Upvote 0
Sorry, I gave some incorrect references there:
First of all I am looking at whether or not AI2 contains "No – 2014-15 non compliant". Out of those results I want it to return "CAFA 2-Initial Assessment for compliance (will exceed 18 years in 2014-15)" if there's a V in A2 or "CAFA 2-Initial Assessment for compliance (will exceed 18 years in 2014-15) & concurrent with DE" if there's DET in A2.
Here's my attempt:

=IF(AND(AI2="No – 2014-15 non compliant",ISNUMBER(SEARCH("V",A2)),"CAFA 2-Initial Assessment for compliance (will exceed 18 years in 2014-15)"),IF(AND(AI2="No – 2014-15 non compliant",ISNUMBER(SEARCH("DET",A2))),"CAFA 2-Initial Assessment for compliance (will exceed 18 years in 2014-15) & concurrent with DE",""))

In simpler terms, I want to return Bingo1 if both of the following conditions are met: A2 contains V and AI contains Yes. Or, I want to return Bingo2 if both of the following conditions are met: A2 contains DET and AI contains Yes
Many thanks​
 
Upvote 0
=if(a2="v",if(a1="yes","bingo1","lose"),if(a2="det",if(a1="yes","bingo2","lose"),"lose")
 
Upvote 0
that is the structure of the if statements

you can insert the isnumber search clever stuff...
 
Upvote 0
Thanks for your efforts and reply. I've managed to get it to work after all. It was due to a few erroneous brackets:
IF(ISNA(AI2),"",IF(AND(AI2="No – 2014-15 non compliant",ISNUMBER(SEARCH("V",A2))),"CAFA 2-Initial Assessment for compliance (will exceed 18 years in 2014-15)",IF(AND(AI2="No – 2014-15 non compliant",ISNUMBER(SEARCH("DET",A2))),"CAFA 2-Initial Assessment for compliance (will exceed 18 years in 2014-15) & concurrent with DE","")))

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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