Need help with nested IF statement..

Galena1

Active Member
Joined
Jun 10, 2010
Messages
305
So I have this nested IF statement that compares dates in various fields:

=IF(AND(G67>=X$2,G67<=Y$2,L67>=X$2,L67<=Y$2),"",IF(AND(L67>X$2,L67<=Y$2),"Closed",""))

It works fine. Now, I want to add a condition where if it sees the word 'CAPA' in column B, to stop and return "" (blank) and not perform the date evaluation.
I added B121="CAPA","" to the front of the formula, but it's not working:

=IF(B121="CAPA","",AND(G121>=X$2,G121<=Y$2,L121>=X$2,L121<=Y$2),"",IF(AND(L121>X$2,L121<=Y$2),"Closed",""))

Anyone know how to add this condition so it works?

Thanks in advance for any help!

:)
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Galena1,

Try......
=IF(B121="CAPA","",IF(AND(G121>=X$2,G121<=Y$2,L121>=X$2,L121<=Y$2),"",IF(AND(L121>X$2,L121<=Y$2),"Closed","")))

Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,223,167
Messages
6,170,470
Members
452,330
Latest member
AFK_Matrix

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