nested IF/AND/OR/Contains

nikhil0311

Board Regular
Joined
May 3, 2013
Messages
200
Office Version
  1. 2013
Platform
  1. Windows

Book1
ABCDEF
1Risk RaitingCountryRenewal dateOutputRelevant countries
2LowCanada;Germany;UKFriday, October 26, 2018YesUK
3HighCanada;Luxembourg;UKSaturday, October 27, 2018NoUnited Kingdom
4MediumAU;EMEA;NZFriday, October 19, 2018NoEMEA
5LowLuxembourgFriday, October 27, 2017YesBE
6MediumAusSaturday, October 20, 2018NoLuxembourg
7Spain
8IE
Sheet1



data is available from A1 to C6 and final output is required in column D i.e. output. If all the below 3 conditions are met then column D should have Yes or No
List of Relevant countries are listed in column F2 to F8. if any of the listed country is present then 2nd condition i.e. Country Column B should be true




if Risk raiting i.e. column A is Low OR Medium


AND


If Country i.e. colum B contains (Any country listed from column F1 to F8)

AND


If Renewal date i.e. Column C is greater than today's date ( todays date is 23 oct 2018, so for tomorrow todays date will be 24th Oct 2018)

if all of the above 3 conditions are satisfied then Column D2 should be Yes or No
you can find the final output listed in column D2

thanks in advance
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Re: nested IF/AND/OR/Contains help required

Hi,

A couple of questions:
1. Are those Real Date values in Column C?
2. When you say "greater than today's date", you mean excluding "equal" to today, is that correct?
 
Upvote 0
Re: nested IF/AND/OR/Contains help required

Well, assuming those a Real Date Values in Column C, and "greater than today" does Not include today.

Formula in D2 copied down:


Book1
ABCDEF
1Risk RaitingCountryRenewal dateOutputRelevant countries
2LowCanada;Germany;UKFriday, October 26, 2018YesUK
3HighCanada;Luxembourg;UKSaturday, October 27, 2018NoUnited Kingdom
4MediumAU;EMEA;NZFriday, October 19, 2018NoEMEA
5LowLuxembourgSaturday, October 27, 2018YesBE
6MediumAusSaturday, October 20, 2018NoLuxembourg
7Spain
8IE
Sheet343
Cell Formulas
RangeFormula
D2=IF(OR(A2="High",C2<=TODAY()),"No",IF(ISNUMBER(LOOKUP(2,1/SEARCH(F$2:F$8,B2))),"Yes","No"))
 
Upvote 0
Re: nested IF/AND/OR/Contains help required

this is awesome. I have another request , could you please provide me a solution for the below?


Book1
ABCDEFG
1OutputMigration DateRenewal Date5 month prior date (migration dt column B -(substract) 5 months prior)RiskFlagFinal Comment
2YesSunday, March 1, 2020Friday, July 5, 2019Tuesday, October 1, 2019LowPEPReady to Migrate
3NoTuesday, February 12, 2019Tuesday, January 1, 2019Wednesday, September 12, 2018HighNo2 update to UK standard required at next schedule renewal
4NoMonday, June 18, 2018Sunday, January 1, 2017Thursday, January 18, 2018HighNo3 update to UK standard required - remedation
5NoThursday, November 14, 2019Wednesday, June 3, 2020Friday, June 14, 2019HighNo4 update to target location scheduled renewal
6NoWednesday, June 3, 2020Monday, June 18, 2018Friday, June 14, 2019LowPEP5 update to target location - Remediation
Sheet2



Raw data is available from Column A to C & E to F
I need to calculate column D i.e. (column B Migration date -(substract) 5 months prior) and then based on below conditions final comments in Column G


If Output i.e. column A is Yes then Final comment i.e. Column G should be "Ready to Migrate"
If Output i.e. column A is No AND Column D date is less than Renewal date i.e. column C then Final comment i.e. Column G should be "2 update to UK standard required at next schedule renewal"
If Output i.e. column A is No AND Column D date is Greater than Renewal date i.e. column C then Final comment i.e. Column G should be "3 update to UK standard required - remedation"
IF column E i.e. Risk is High OR Column F i.e. Flag = PEP AND Column D date is less than Renewal date i.e. column C then final comment i.e. column G should be "4 update to target location scheduled renewal"
IF column E i.e. Risk is High OR Column F i.e. Flag = PEP AND Column D date is Greater than Renewal date i.e. column C then final comment i.e. column G should be "5 update to target location - Remediation"

let me know if you have any questions :)
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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