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",""))
 

oldbrewer

Board Regular
Joined
Apr 11, 2010
Messages
10,985
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...........
 

livmun

New Member
Joined
Feb 6, 2014
Messages
8
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​
 

oldbrewer

Board Regular
Joined
Apr 11, 2010
Messages
10,985
=if(a2="v",if(a1="yes","bingo1","lose"),if(a2="det",if(a1="yes","bingo2","lose"),"lose")
 

oldbrewer

Board Regular
Joined
Apr 11, 2010
Messages
10,985
that is the structure of the if statements

you can insert the isnumber search clever stuff...
 

livmun

New Member
Joined
Feb 6, 2014
Messages
8
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>
 

Forum statistics

Threads
1,082,305
Messages
5,364,400
Members
400,800
Latest member
germanpbv

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top