# Nested IF(AND formula not being accepted...

#### QutieJsMom

##### New Member
PLEASE HELP! I've entered this nested formula and Excel is not accepting it. For the life of me I can't see what I've left out or put in that's not working. I haven't used nested formulas for awhile so I'm rusty and hoping this is something simple I've over looked. Thanks in advance for your help! =IF(AND(G4="Friday",G6="A"),Schedule!D2,=IF(AND(G4="Friday",G6="B"),Schedule!E2,=IF(G6="A",Schedule!B2,=IF(G6="B",Schedule!C2,""))))

### Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

#### AhoyNC

##### Well-known Member
Looks like too many = signs before the if. Try:

Code:
``=IF(AND(G4="Friday",G6="A"),Schedule!D2,IF(AND(G4="Friday",G6="B"),Schedule!E2,IF(G6="A",Schedule!B2,IF(G6="B",Schedule!C2,""))))``

#### joeu2004

##### Banned user
For the life of me I can't see what I've left out or put in that's not working.
[....]
Rich (BB code):
``````=IF(AND(G4="Friday",G6="A"),Schedule!D2,=IF(AND(G4="Friday",G6="B"),Schedule!E2,
=IF(G6="A",Schedule!B2,=IF(G6="B",Schedule!C2,""))))``````

Too many equal signs ("="). The syntax should be:
Rich (BB code):
``````=IF(AND(G4="Friday",G6="A"),Schedule!D2,IF(AND(G4="Friday",G6="B"),Schedule!E2,
IF(G6="A",Schedule!B2,IF(G6="B",Schedule!C2,""))))``````
But you can simplify as follows:
Rich (BB code):
``````=IF(G6="A",IF(G4="Friday",Schedule!D2,Schedule!B2),
IF(G6="B",IF(G4="Friday",Schedule!E2,Schedule!C2),""))``````

#### QutieJsMom

##### New Member
Thank you all!! I figured it was something as simple as that. It does indeed work much better if I remove the = before all but the first IF! Works nicely. Joeu2004, I love your further suggestion of simplifying it! I see what cha did there & will use it. THANK YOU THANK YOU THANK YOU!! This is my first post here. Is there a rewards system for best answer or anything that I need to take care of or to mark this thread as solved?

#### joeu2004

##### Banned user
Joeu2004, I love your further suggestion of simplifying it! I see what cha did there & will use it. THANK YOU THANK YOU THANK YOU!! This is my first post here. Is there a rewards system for best answer

I don't know. And honestly, I don't care about such things. My reward comes from your satisfaction with an answer. Thanks for the feedback.

or anything that I need to take care of or to mark this thread as solved?

Apparently not in this forum.

Replies
8
Views
146
Replies
2
Views
225
Replies
3
Views
183
Replies
0
Views
165
Replies
5
Views
516

1,195,592
Messages
6,010,621
Members
441,558
Latest member
lambierules

### 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.

### Which adblocker are you using?

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

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