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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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,215,276
Messages
6,124,006
Members
449,137
Latest member
abdahsankhan

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