Nested IF(AND formula not being accepted...

QutieJsMom

New Member
Joined
Sep 13, 2014
Messages
7
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

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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,""))))
 
Upvote 0
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),""))
 
Upvote 0
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?
 
Upvote 0
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. :(
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,424
Members
448,896
Latest member
MadMarty

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top