Finding nearest Friday formula

Nicole87

New Member
Joined
Feb 18, 2014
Messages
35
Hi,

I have an IF formula that looks to a particular date and brings back the nextFriday however I need to change it so that if the date is already a Friday that is keeps this date rather than taking the following friday.

The current formula I have is:

=IFERROR(IF(WEEKDAY([@[EXPECTED PAYMENT DATE]]) < 6, [@[EXPECTED PAYMENT DATE]] + (6- WEEKDAY([@[EXPECTED PAYMENT DATE]])), [@[EXPECTED PAYMENT DATE]] + 13 - WEEKDAY([@[EXPECTED PAYMENT DATE]])),0)

Thanks!
 
Excellent - that works thankyou!!

Wondering whether it is possible to add in a criteria at the start so that along with if = PAID, PAID to also have if = DO NOT PAY, DO NOT PAY & if = DUE,"DUE"?

Hi Nicole87,

I'm glad to help and thanks for the feedback.

If I understand correctly what you want now, maybe this can helps:

Code:
=IFERROR(VLOOKUP([PAYMENT STATUS],{"PAID";"DO NOT PAY";"DUE"},1,0),
IF([@[DATE OVERRIDE]]<>"",[@[DATE OVERRIDE]],SUM(J9,K9,L9))+
6-MOD(IF([@[DATE OVERRIDE]]<>"",[@[DATE OVERRIDE]],SUM(J9,K9,L9)),7))

Markmzz
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi Nicole87,

I'm glad to help and thanks for the feedback.

If I understand correctly what you want now, maybe this can helps:

Code:
=IFERROR(VLOOKUP([PAYMENT STATUS],{"PAID";"DO NOT PAY";"DUE"},1,0),
IF([@[DATE OVERRIDE]]<>"",[@[DATE OVERRIDE]],SUM(J9,K9,L9))+
6-MOD(IF([@[DATE OVERRIDE]]<>"",[@[DATE OVERRIDE]],SUM(J9,K9,L9)),7))

Markmzz

Fantastic - thanks so much for your assistance!
 
Upvote 0
Hi,

I have a very similar formula that needs to bring back the nearest friday again except the formula has less rules. The current formula is: =IF(LEN([@[Override INV Month]])>0,[@[Override INV Month]],[@[INV Month]])

How do I add in the above to make sure it bring back a fri?

Many Thanks,
Nicole
 
Upvote 0
Hi,

I have a very similar formula that needs to bring back the nearest friday again except the formula has less rules. The current formula is: =IF(LEN([@[Override INV Month]])>0,[@[Override INV Month]],[@[INV Month]])

How do I add in the above to make sure it bring back a fri?

Many Thanks,
Nicole

Hi Nicole,

Maybe this:

Code:
=IF(LEN([@[Override INV Month]]),[@[Override INV Month]],[@[INV Month]])+6-MOD(IF(LEN([@[Override INV Month]]),[@[Override INV Month]],[@[INV Month]]),7)

Or

=IF(LEN([@[Override INV Month]]),[@[Override INV Month]]+6-MOD([@[Override INV Month]],7),[@[INV Month]])

Markmzz
 
Upvote 0
Hi Nicole,

Maybe this:

Code:
=IF(LEN([@[Override INV Month]]),[@[Override INV Month]],[@[INV Month]])+6-MOD(IF(LEN([@[Override INV Month]]),[@[Override INV Month]],[@[INV Month]]),7)

Or

=IF(LEN([@[Override INV Month]]),[@[Override INV Month]]+6-MOD([@[Override INV Month]],7),[@[INV Month]])

Markmzz


Thanks for this.

Is there a formula that will bring back the 1st date in the month? Instead of the nearest fri?
 
Upvote 0
Thanks for this.

Is there a formula that will bring back the 1st date in the month? Instead of the nearest fri?

If I understand what you want, maybe this:

Code:
=EOMONTH(IF(LEN([@[Override INV Month]]),[@[Override INV Month]],[@[INV Month]]),-1)+1

Markmzz
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,177
Members
448,554
Latest member
Gleisner2

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