# Formula Not Working

#### rob51852

##### Board Regular
Hello

I have put together a formula but cannot get it to work. Can anyone see where I have gone wrong? I’ve looked at it for so long I can’t see the wood for the trees!

Code:
``=IF(AND(A5=Sheet2!\$B\$2,\$Y\$5=0,\$Y\$6=0,\$AA\$5=0,\$AA\$6=0,\$AE\$5="First",\$Z\$5=0,\$Z\$6="1"),"PLAY",IF(AND(A5=Sheet2!\$B\$2,\$Y\$5=0,\$Y\$6=0,\$AA\$5=0,\$AA\$6=0,\$AE\$6="First",\$Z\$5=0,\$Z\$6=2),"PLAY"))``

Thanks

Last edited:

### Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

#### sadboy309

##### Board Regular
I don't understand data of Cells. But, I see your formula lacks the False clause of the final IF function.

Code:
``=IF(AND(A5=Sheet2!\$B\$2,\$Y\$5=0,\$Y\$6=0,\$AA\$5=0,\$AA\$6=0,\$AE\$5="First",\$Z\$5=0,\$Z\$6="1"),"PLAY",IF(AND(A5=Sheet2!\$B\$2,\$Y\$5=0,\$Y\$6=0,\$AA\$5=0,\$AA\$6=0,\$AE\$6="First",\$Z\$5=0,\$Z\$6=2),"PLAY","NOT PLAY"))``

#### Fluff

##### MrExcel MVP, Moderator
How about
=IF(AND(A5=Sheet2!\$B\$2,\$Y\$5=0,\$Y\$6=0,\$AA\$5=0,\$AA\$6=0,\$AE\$5="First",\$Z\$5=0,OR(\$Z\$6=1,\$Z\$6=2)),"PLAY","???")

#### rob51852

##### Board Regular
You've fixed! Thanks, really appreciate it

#### Fluff

##### MrExcel MVP, Moderator
Glad we could help & thanks for the feedback

Replies
8
Views
145
Replies
4
Views
125
Replies
0
Views
69
Replies
3
Views
79
Replies
0
Views
53

Threads
1,109,400
Messages
5,528,511
Members
409,821
Latest member
decibelpilot

### This Week's Hot Topics

• Change military grades into rank
Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
• VBA COUNTIF SOLUTION
Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
• INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
• Auto-Create a monthly Sign in sheet for preschool students
The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
• VBA vlookup multiple results
Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
• Extract values for earliest/latest times
I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...