# IF And statement

#### sheils

##### New Member
Please could someone help me - I just don't seem to get it right

I need to write a formula - I've tried to be as clear as possible :

 Potential Q4: Do they want the challenge right now?​ Overall Potential Calculation​ Potential Calculation​ 3​ 8​ 1​ 3​ 8​ 1​

If Overall Potential is greater than 8 but less than 10 and Potential Q4 is equals 1 number return the number 1
 If Overall Potential is greater than 8 but less than 10 and Potential Q4 is greater than 1 return the number 2 The answer is in Potential Calculation

#### Debaser

##### Well-Known Member
What if none of the criteria match?

#### sheils

##### New Member
if it matches the answer is 1 if it doesn't match the answer is 2

#### Debaser

##### Well-Known Member
I mean what if Overall Potential is not between 8 and 10, or if Potential Q4 is less than 1?

#### sheils

##### New Member
if it is not between 8 & 10 - answer is 1 & if it is not less than 1 - answer is 2

#### Debaser

##### Well-Known Member
OK, thanks. Assuming those are in columns A:C, you could use:

=IF(AND(B2>8,B2<10),if(A2<1,2,if(A2=1,1,2)),1)

in C2 and copy down.

#### sheils

##### New Member
Thank you sooooooo much - you are a star