Large if/then statement

squeakums

Well-known Member
Joined
May 15, 2007
Messages
830
Office Version
  1. 365
I need your help with this large if/then statement or to see if it is possible:

If column E2 = "Draft" and column G2 = "Accept Risk" then Yes OR
If column E2 = "Draft" and column I2 = between the date range listed in column T1 (for example it would show date range 4/1/24 - 6/30/24 then yes OR
If column E2 = "Draft" and column G2 = "Risk Tolerance Review" then Yes OR
If column E2 = "Closed" and J2 = between the date range listed in column U2 (for example it would show date range 4/1/24 - 6/30/24 and column I has a date less than what's in column U2 then Yes OR
If column E2 = "Closed" and J2 = < is blank> AND I2 < V2 then Yes OR
If column E2 = "Deficiency in Progress" OR e2="Pending Validation" and J2 = <is blank> AND I2 = "Past Due" then YES
Otherwise if none of these are meet, then No
 
If you need OR(a, b, c) you can write a + b + c
Uf you need AND(a, b, c) you can write a*b*c

If you need for example AND(a, OR(b, c, d)) you can write a*(b + c + d).

A value iqual to 0 is the same as FALSE, anthing different from 0 is TRUE, even negative values.

Hope this helps
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
See if this helps at all.
Excel Formula:
=IF(AND(D2="Draft",
        OR(
           F2="Accept Risk",
           AND(H2>=$T$1,H2<=$T$2))),
    "Yes",
    IF(AND(D2="Closed",
           OR(
              F2="Risk Tolerance Review",
              AND(I2>=$T$1,I2<=$T$2,H2>=$U$1,H2<=$U$2),
              AND(H2>=$T$1,H2<=$T$2,OR(I2="",I2>$T$2)))),
       "Yes",
       IF(AND(
              OR(D2="Deficiency in Progress",D2="Pending Validation"),
              AND(I2="",H2="Past Due")),
          "Yes",
          "No")))
 
Upvote 0
For the OR code - is it using a multiple symbol? Confused what its doing there

=IF(AND(D2="Draft", OR( F2="Accept Risk", AND(H2>=$T$1,H2<=$T$2))), "Yes", IF(AND(D2="Closed", OR( F2="Risk Tolerance Review", AND(I2>=$T$1,I2<=$T$2,H2>=$U$1,H2<=$U$2), AND(H2>=$T$1,H2<=$T$2,OR(I2="",I2>$T$2)))), "Yes", IF(AND( OR(D2="Deficiency in Progress",D2="Pending Validation"), AND(I2="",H2="Past Due")), "Yes", "No")))
Yes, thank you this works!
 
Upvote 0

Forum statistics

Threads
1,221,504
Messages
6,160,199
Members
451,630
Latest member
zxhathust

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