If 'x' then 'y' unless 'z' formula with dates - help please

acana

New Member
Joined
Apr 28, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi,

I'm not a very experienced excel user and I'm struggling with getting the formula right on this one. You will see the columns I am dealing with below. Basically, I need column C to produce either a date or N/A.

  • If the date in A is before 1st June 2022 then the date in C should be 31st August 2022 unless B is yes in which case C should be N/A
  • If the date in A is on or after 1st June 2022 then the date in C should be A2+90days unless B is yes in which case C should be N/A
(In the UK so dates are DD/MM/YYYY)

Example below of what I would need column C to look like.
ABC
1Date File OpenedIs the file still in use?Date file should be archived
202/04/2020No31/08/2022
304/06/2022No02/09/2022
405/08/2021YesN/A
509/07/2022YesN/A

Any help would be greatly appreciated.

Thanks :)
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
=IF(A2="","",IF( B2="yes", "N/A", IF(A2 < DATEVALUE("1/6/22"),DATEVALUE("31/8/22"), A2+90)))

xl2bb is not working for me on my new laptop - sorry
i will try again

Book1
ABC
1datein usearchive
26/2/228/31/22
35/3/228/31/22
46/4/229/2/22
56/5/22yesN/A
6 
71/1/21yesN/A
8 
9 
10 
Sheet1
Cell Formulas
RangeFormula
C2:C10C2=IF(A2="","",IF( B2="yes", "N/A", IF(A2 < DATEVALUE("1/6/22"),DATEVALUE("31/8/22"), A2+90)))
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(B2="yes","N/A",IF(A2<DATE(2022,6,1),DATE(2022,8,31),A2+90))
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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