Catch first Friday in a month or Next Friday

mrxlsx

Board Regular
Joined
Dec 15, 2012
Messages
95
Hello all,

I have a date column A2 with random dates. In the next column B2, I want to catch the first Friday of that month, if it A2 is later than the current month's first Friday, then I have catch first Friday of the next month. This is one problem.

Another problem is: In another sheet, I have same date column A2 with random dates. In the next column B2, I want to catch the first Friday of the current month, if A2 is later than the current month's first Friday then second Friday, if it misses then third Friday, if it misses then fourth Friday.

What function should I use for these to work ??

thanks for everybody who try this !!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
first formula:
Code:
=IF(DAY(A2+(7-WEEKDAY(A2,16)))<=7,A2+(7-WEEKDAY(A2,16)),(1&"/"&MONTH(A2)+1&"/"&YEAR(A2))+(7-WEEKDAY((1&"/"&MONTH(A2)+1&"/"&YEAR(A2)),16)))

second formula:
Code:
=A2+(7-WEEKDAY(A2,16))
 
Last edited:
Upvote 0
small update to the first formula, so it should work in December aswell:
Code:
=IF(DAY(A2+(7-WEEKDAY(A2,16)))<=7,A2+(7-WEEKDAY(A2,16)),(1&"/"&IF(MONTH(A2)=12,1,MONTH(A2)+1)&"/"&IF(MONTH(A2)=12,YEAR(A2)+1,YEAR(A2)))+(7-WEEKDAY((1&"/"&IF(MONTH(A2)=12,1,MONTH(A2)+1)&"/"&IF(MONTH(A2)=12,YEAR(A2)+1,YEAR(A2))),16)))
 
Last edited:
Upvote 0
Hi mrxlsx,

For first friday

=DATE(YEAR(J80);MONTH(J80);1+(6-WEEKDAY(DATE(YEAR(J80);MONTH(J80);1))))

for nth friday

=IF(WEEKDAY(J80;16)<7;J80+7-WEEKDAY(J80;16);J80)
 
Upvote 0
first formula doesn't work for the condition when the first Friday already pass.
 
Upvote 0
Hi Skorpionkz,

Unless I am missing your point if the first Friday of the month already pass, you should use formula for nth Friday. :confused:

Vândalo
 
Upvote 0
if it A2 is later than the current month's first Friday, then I have catch first Friday of the next month. This is one problem.

There was 2 separate conditions in the thread.</SPAN>
 
Upvote 0
Today
(B1 ->)
=today()
weekday of 1st of month
(B2 ->)
=weekday(date(year(today());month(today());1);16)
1st Friday
(B3 ->)
=date(year(today());month(today());1+(7-B2))
today>1st Friday
(B4 ->)
=b1>b3
weekday of 1st of next month (B5 ->)=weekday(date(year(today());month(today())+1;1);16)
1st Friday of next month
(B6 ->)
=date(year(today());month(today())+1;1+(7-B5))

<tbody>
</tbody>
Ok,

this is my solution if your A2 already pass current month's first Friday:

=IF(TODAY()>DATE(YEAR(TODAY());MONTH(TODAY());1+(7-WEEKDAY(DATE(YEAR(TODAY());MONTH(TODAY());1);16)));DATE(YEAR(TODAY());MONTH(TODAY())+1;1+(7-WEEKDAY(DATE(YEAR(TODAY());MONTH(TODAY())+1;1);16)));DATE(YEAR(TODAY());MONTH(TODAY());1+(7-WEEKDAY(DATE(YEAR(TODAY());MONTH(TODAY());1);16))))

The formula above could be simplified if you use the above table and write the following formula

=if(b4;b6;b3)

Hope this help

Vândalo
 
Upvote 0

Forum statistics

Threads
1,215,639
Messages
6,125,970
Members
449,276
Latest member
surendra75

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