Formula to extract first working day after month end in Cell A1

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,603
Office Version
  1. 2021
Platform
  1. Windows
I have text in Cell A1 which contains the month end date for eg MONTH ENDED 29/04/2022

I have public holidays in Cells O2:O13

I need to formula to extract the run date in cell C1 , which will be the first working day in the new month, being 3 may 2022, based on the month end date on A1

Eg
The Sale report for April will be run on the 3 May 2022

See link below




Your assistance is most appreciated
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Why should it be the 3rd & not the 2nd of May?
 
Upvote 0
I personally do not like to rely on extracting numbers or dates from text
If you are the one setting up the file, make sure you have the dates you need stored in seprate cells as dates, then use them for calculations or to include them in texts.
If you want the next working day in C1, use this:
Excel Formula:
=WORKDAY(DATEVALUE(TRIM(RIGHT(A1,10))),1,$O$2:$O$13)
If you need to customize weekends you should use WORKDAY.INTL
 
Upvote 0
Solution
the 2 nd of May is a public holiday in South Africa (see public Holidays on Col O)
 
Upvote 0
or this to get you all the way:
Excel Formula:
="The Sale report for " &TEXT(DATEVALUE(TRIM(RIGHT(A1,10))),"[$-en-ZA]mmmm;@")& " will be run on the " & TEXT(WORKDAY(DATEVALUE(TRIM(RIGHT(A1,10))),1,$O$2:$O$13),"[$-en-ZA]d mmmm yyyy;@")
 
Upvote 0
Very difficult to tell that as when I down the file some of those dates are text & some are dates, so I have no way of knowing what those dates really are. Also I have no idea what public Holidays South Africa have. ;)

As long as the dates on col O are real dates, you can use
Excel Formula:
="The Sale report for "&TEXT(RIGHT(A1,10),"mmmm")&" will be run on the "&TEXT(WORKDAY(DATE(YEAR(RIGHT(A1,10)+0),MONTH(RIGHT(A1,10)+0)+1,0),1,O2:O14),"d mmm yyyy")
 
Upvote 0
Thanks for your valuable input bobsan42

Your formula works perfectly

 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,194
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