Workday function to find the midmonth business day of the month error

spicy

New Member
Joined
Mar 12, 2008
Messages
11
Hi All,

I have been trying to fix the below syntax for hours but not successful at all. Could someone please help me?

Midmonthworkday=application.Workday(Application.Date(Year(Date),Application.month(date),14),1)

Your help is very much appreciated!!!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Try this:
Code:
midmonthworkday = Application.WorkDay([COLOR=#ff0000]DateSerial[/COLOR](Year(Date), Month(Date), 14), 1)
 
Upvote 0
Try this:
Code:
midmonthworkday = Application.WorkDay([COLOR=#ff0000]DateSerial[/COLOR](Year(Date), Month(Date), 14), 1)
Probably a tad slower, but here is an alternate method...

midmonthworkday = [WORKDAY(DATE(YEAR(NOW()),MONTH(NOW()),14),1)]
 
Upvote 0
You are welcome.
 
Upvote 0
Rick, thanks a lot for your response! I tried your formula and it gives me the same desired outcome. Thank you and have a good day!
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,007
Members
448,935
Latest member
ijat

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