If date range is between December OR there is less than 25 business days before Good Friday, return Z

pypyy

New Member
Joined
Oct 19, 2017
Messages
3
Hi everyone,

I have been trying for the past hour to think of a solution for the below without success. I was wondering if anyone could help me.

  • If Date of Meeting is any day during December, return the value = 25.
  • If the Date of Meeting is less than 25 business days before Good Friday (30/03/2018), return the value = 25.
  • Otherwise, display/return the value = 20.

Would anyone please help me?


Thank you. :)
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Would this work for you?


Book1
AB
1Date Of MeetingReturn
219-Oct-201720
319-Nov-201720
419-Dec-201725
519-Jan-201820
619-Feb-201820
719-Mar-201825
Sheet1
Cell Formulas
RangeFormula
B2=IF(OR(MONTH(A2)=12,AND(A2>DATE(2018,3,5),A2<=DATE(2018,3,30))),25,20)


WBD
 
Upvote 0
Try this:

=IF(OR(AND(A1>WORKDAY(DATE(2018,3,30),-25),A1 < DATE(2018,3,30)),MONTH(A1)=12),25,20)<date(2018,3,30)),month(a1)=12),25,20)[ code]<date(2018,3,30)),month(a1)="12),25,20)<" html=""></date(2018,3,30)),month(a1)=12),25,20)[>
 
Last edited:
Upvote 0
Hi wideboydixon,

That looks good but for the second part(Good Friday), is there a way to return a value of 25 if the date of the meeting falls between 27/02/2018 to 30/03/2018?


Thanks and regards.
 
Upvote 0
Sorry I missed the "business days" piece. You could try Steve's solution or just adjust the date in my original formula:

Code:
=IF(OR(MONTH(A2)=12,AND(A2>=DATE(2018,2,27),A2<=DATE(2018,3,30))),25,20)

WBD
 
Upvote 0
Thanks to both of you so much.

This formula works nicely for me: =IF(OR(MONTH(A2)=12,AND(A2>=DATE(2018,2,27),A2<=DATE(2018,3,30))),25,20)

But along with having the Good Friday for 2018, is there a way to add 2019 and 2020 Good Friday in the formula as well?


Thanks so much in advance.
 
Upvote 0
Then it's time to break out the Easter Sunday formula which is OK for the next few years. I also think that 25 business days before 30-Mar-2018 is 23-Feb-2018 not 27-Feb-2018.


Book1
AB
1Date Of MeetingReturn
219/10/201720
319/11/201720
419/12/201725
519/01/201820
619/02/201820
719/03/201825
Sheet1
Cell Formulas
RangeFormula
B2=IF(OR(MONTH(A2)=12,AND(A2>=WORKDAY(FLOOR(DATE(YEAR(A2),5,DAY(MINUTE(YEAR(A2)/38)/2+56)),7)-36,-25),A2<=FLOOR(DATE(YEAR(A2),5,DAY(MINUTE(YEAR(A2)/38)/2+56)),7)-36)),25,20)


WBD
 
Upvote 0

Forum statistics

Threads
1,215,849
Messages
6,127,276
Members
449,372
Latest member
charlottedv

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