# Off Topic > Tips and Tutorials >  > [SOLVED] Nesting OR &amp; AND Functions to Meet Multiple Criteria

## Rhea

Could someone please tell me what I am doing wrong with this formala?  Each if argument work individually but not combined.  Please help!!

IF(AND((AB7-AB5)>0,(((AB7-AB5)-((AB7-AB5)*22.5%))/AB5)>AB13),((AB7-AB5)*22.5%)+((((((AB7-AB5)-((AB7-AB5)*22.5%))/AB5)-AB13)*10%)*AB5)),IF(AND((AB7-AB5)>0,(((AB7-AB5)-((AB7-AB5)*22.5%))/AB5)<AB13),((AB7-AB5)*22.5%))

----------


## Rhea

Could someone please tell me what I am doing wrong with this formala?  Each if argument work individually but not combined.  Please help!!

IF(AND((AB7-AB5)>0,(((AB7-AB5)-((AB7-AB5)*22.5%))/AB5)>AB13),((AB7-AB5)*22.5%)+((((((AB7-AB5)-((AB7-AB5)*22.5%))/AB5)-AB13)*10%)*AB5)),IF(AND((AB7-AB5)>0,(((AB7-AB5)-((AB7-AB5)*22.5%))/AB5)<AB13),((AB7-AB5)*22.5%))

----------


## Guest

You wrote If, but didn't finish your If, but nothing for the if. The whole point of an IF, is to have a Then or Else for your boolean statement. I believe you would need an Else or a "Then" to complete your statement. You may need to break these down into several If thens, nesting the statements.

----------


## Sherly

Could someone please tell me what am I doing wrong with this formula? The returns I get are all "DIRECT", even there is "DOMAIN" or "NON-DOMAIN" in the column A .

IF(AND(A2="DOMAIN",OR(A2="NON-DOMAIN"),A2,"DIRECT")

Is there any formula that I can substitute?

My Problem is : 
I want to create a formula that returns to its original value if the range of data in column A="DOMAIN" or "NON-DOMAIN"

Otherwise, the formula is to return "DIRECT"

----------


## Barry Farmer

I want to put a formula in a spread sheet that if block f5 is equal to or higher than 20% of block b4 then block d3 * .0 if less than then * by .0078

----------


## Snooza35

Hello I Am quite new to this all so need help plz.

ok i am in need of assisstance.
i want my cell to be blank if no feedback is given and to be correct or in correct depending on the answer.

My Formula:
=IF(B2="","")=IF(B2=C2,"correct")

but in my cell it keeps coming up witih FALSE

if u can help it will be much aprriciated thnx

also email me @ Roland_de_souza@hotmail.co.uk

----------


## elizabeth

I need to create a formula that will tell me how many times "m" appears in column l AND "u" appears in column p. The same goes for "f" in l and "u" in p. 
I am trying to find the number of unemployed males and the number of unemployed females in our database.

----------


## ExcelTip

Problem:	

We want to create a formula that returns \"1\" if Num1=10 and either Num2=5 or Num3=2. 
Otherwise, the formula is to return \"0\".	

Solution:								
Use the IF, AND, and OR functions as shown in the following formula:
=IF(AND(A2=10,OR(B2=5,C2=2)),1,0)

----------


## alizok

If i'm not mistaken the reason it doesn't work is because excel accepts only 8 if then statements.   :Mad:

----------


## fresh33308

Using a 2 by 4 matrix, I am having a problem making the formula work and am looking for ideas.

             A1                           B1                answer
              0          ---                1     ---        c6*4+2
              0          ---                2     ---            0
              1          ---                1     ---        c6*2+1
              1          ---                2     ---            0  

=if(and(a1<1,b1<2,c6*4=2,if(and(a1>0,b1<2,C6*2+1,0)))

Simplifying anything in b1 over one = 0 reduces the work however I don't remember if you can use the , for otherwise 0.  It has been a long time since I used these and if positioning is different these days.  The excel help uses a data base which is not helpful.

Any Ideas?  Mail to fresh33308@yahoo.com

PS I know it is somethin simple but altimerz is setting in - OR - I think so?

thanks

----------


## ajones

Grade Card:

Students are given bonus points/penalty depending on homework rating.  See below:

Good     4 pts
OK        2 pts
Poor      -2 pts

I need to utlize a nested IF function to complete it but I can't totally figure it out.  Can you help?

----------


## alizok

all you need to say is this:

If(A1="Good",4,if(A1="OK",2,2))  another way of write it  
IF(OR(B10="Poor",B10="OK"),2,4)

hope it helps

----------


## wendywithsmb

Help- I have 2 very long lists ( a small sample is attached ) and I want to compare them using DUNs and GUD #s; and ultimately populate the list of countries from the first list, into the second list.  HELP...I figured it's an IF statement with a range, ie: IF (F2=C2:C9)OR(F2=D2:D9),"no match", what goes here?)
I can't get it to put the corresponding country from the matched cell into that box. 

HELPPPPPP
thanks
A	B	C	D	E	F	G	
Account Name	Country	Global Ulti DUNS #	DUNS #	Account list #2	DUNS or GUD #	Country	
Fidelity Brokerage Services, Inc	United States	95856332	125223706	Ernst & Young LLP	181271339		
Ernst & Young LLP	United States	58369562	181271339	United Parcel Service, Inc.	13114066		
Lockheed Martin Corporation - MD	India	834951691	16913048	Nova Technology, Inc.	139622567		
Milliken & Company	Pakistan	2017440	2017440	Fidelity Brokerage Services, Inc	125223706		
Ernst & Young LLP	United States	2508463	2508463	Lockheed Martin Corporation - MD	834951691		
United Parcel Service, Inc.	United States	6991681	13114066	United States Patent and Trademark Office	72532075		
Nova Technology, Inc.	United States		139622567	Fidelity Brokerage Services, Inc	95856332		
United States Patent and Trademark Office	United States		72532075	Milliken & Company	2017440

----------


## ramanan

can some one help me? 

i am in the sutuation to use more than 7 nested if in a formula, excel does not accept more than 7 nested loops, how can i avoid nested loops?

----------


## emai

good day!  i just wana ask some help regarding with our school requirement about functions.the problem is.."we are going to get the time difference of a paticular hour worked by an employee using the combination of if,or,iserror,isblank formula"wat will be the formula with this?for example,timein-8:00am,timeout-5:00pm.wat will be the formula to get the time differnce using the combination of the 4 functions?thanks..

----------

