Bank holiday to be factored in End of Month formula EOMONTH

mrsushi

Board Regular
Joined
Nov 18, 2006
Messages
180
Office Version
  1. 2010
Hi, how can the below formula factor in bank holidays? So the below formula works off E2 which is todays date ie 29th Dec.

Ideally, the below formula is to trigger an ACTION 2 working days before the end of the month. However, the 31st Dec is a Saturday, so we need to factor this in. how can we incorporate a list of bank holiday dates using the below formula?

=IF(EOMONTH(TODAY(), 0)=E2, "ACTION", "DON’T ACTION")

Many thanks
M
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Check information on Workday and /or Workday.intl


Cell Formulas
RangeFormula
E2:E3E2=TODAY()
F2F2=WORKDAY(EOMONTH(E2,0),-2,Holidays)
G2G2=IF(TODAY()=E2, "ACTION", "DON’T ACTION")
F3F3=IF(TODAY()=WORKDAY(EOMONTH(E3,0),-2,Holidays), "ACTION", "DON’T ACTION")
Named Ranges
NameRefers ToCells
Holidays='1c'!$L$2:$L$3F2
 
Upvote 0
Check information on Workday and /or Workday.intl


Cell Formulas
RangeFormula
E2:E3E2=TODAY()
F2F2=WORKDAY(EOMONTH(E2,0),-2,Holidays)
G2G2=IF(TODAY()=E2, "ACTION", "DON’T ACTION")
F3F3=IF(TODAY()=WORKDAY(EOMONTH(E3,0),-2,Holidays), "ACTION", "DON’T ACTION")
Named Ranges
NameRefers ToCells
Holidays='1c'!$L$2:$L$3F2

Many thanks Dave. However, if the date is 30/12/2022, it needs to return No Action. The current formula appears to stay Action when it is 30th Dec, but we need to be as per below

29th represents 2 working days left = Action
whereas 30th represents 1 working day left = No action
 
Upvote 0
Did you try the formula with Dec 30th?
It seems to work OK!

Workday.xlsm
EFG
3Thu 29-Dec-22ACTION
4Fri 30-Dec-22DON’T ACTION
5
1b
Cell Formulas
RangeFormula
E3E3=TODAY()
F3F3=IF(TODAY()=WORKDAY(EOMONTH(E3,0),-2,Holidays), "ACTION", "DON’T ACTION")
F4F4=IF(E4=WORKDAY(EOMONTH(E4,0),-2,Holidays), "ACTION", "DON’T ACTION")
Named Ranges
NameRefers ToCells
Holidays='1c'!$L$2:$L$3F4
 
Upvote 0
Solution
Did you try the formula with Dec 30th?
It seems to work OK!

Workday.xlsm
EFG
3Thu 29-Dec-22ACTION
4Fri 30-Dec-22DON’T ACTION
5
1b
Cell Formulas
RangeFormula
E3E3=TODAY()
F3F3=IF(TODAY()=WORKDAY(EOMONTH(E3,0),-2,Holidays), "ACTION", "DON’T ACTION")
F4F4=IF(E4=WORKDAY(EOMONTH(E4,0),-2,Holidays), "ACTION", "DON’T ACTION")
Named Ranges
NameRefers ToCells
Holidays='1c'!$L$2:$L$3F4

Opps, seems to be working now.

Many thanks for your help on this.

Regards
M
 
Upvote 0
Just one last question, how would the formula change if we need the conditions?

"Action" on first working day of month ie 03/01/2023
"Action" on second working day of month 04/01/2023

I tried to tweak the formula, but doesnt seem to give me the returns

IF(TODAY()=WORKDAY(EOMONTH(E2,0),-1,Holidays), "Action", "No Action")
 
Upvote 0
I got it to work with the below

=IF(E2=WORKDAY(DATE(YEAR(E2),MONTH(E2),1)-1,1,Holidays!A:A), "LOAD", "SCOPE")
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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