A formula to calculate the third Wednesday of the month.

arniebun

New Member
Joined
Jun 11, 2020
Messages
43
Office Version
  1. 365
Platform
  1. Windows
I have loads of data with 01/01/2013 01/02/2014 and so on till present day. I need to calculate the third Wednesday of each month, can anyone please help. a formula would be ideal. please please help me, its a nightmare trying to do it manually.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
OK, this should work
assuming your data is in column A starting in cell A2
in column B add
VBA Code:
=TEXT(A2,"ddd-mmm")
in column C add
VBA Code:
=IF(AND(TEXT(A2,"ddd")="Wed",COUNTIF($B$2:B2,"Wed-"&TEXT(A2,"mmm"))=3),"Third Wednesday","")

You can then create a pivot table or filter your data to neatly summarise your data

(Apologies for not posting in XL2BB but work have blocked it, i hope using the VBA code instead has made it clear)
 
Upvote 0
Try this...

In A1 put the first month you want, example: 1/1/2020.

Then in C1 I put this formula:

=DATE(YEAR(A1),MONTH(A1),22)-WEEKDAY(DATE(YEAR(A1),MONTH(A1),4))

Then in C2 I put:

=DATE(YEAR(C1),MONTH(C1)+1,22)-WEEKDAY(DATE(YEAR(C1),MONTH(C1)+1,4))

Then drag down...
 
Upvote 0
thank you so much I tried all solution only 1 of them just give me a blank cell which was dave87's but thank you all so much for responding. this is by far the best excel help board which makes me stay loyal to this one. thanks again you all have help me so much.
 
Upvote 0
thank you so much I tried all solution only 1 of them just give me a blank cell which was dave87's but thank you all so much for responding. this is by far the best excel help board which makes me stay loyal to this one. thanks again you all have help me so much.
did you drag the formula down?
 
Upvote 0
Upvote 0
It looks like three of the suggestions provide the correct answer. You can use whichever one you prefer.

Cell Formulas
RangeFormula
B2:B10B2=DATE(YEAR(A2),MONTH(A2),22)-WEEKDAY(DATE(YEAR(A2),MONTH(A2),4))
C2:C10C2=WORKDAY.INTL(A2-1,3,"1101111")
D2:D10D2=A2+21-WEEKDAY(A2+3)
A3:A10A3=EDATE(A2,1)
 
Upvote 0
it might have been my excel or as ding it wrong, i tryied it again and it worked. thanks
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,318
Members
449,218
Latest member
Excel Master

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