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!
 
Can you explain what exactly you want to achieve?

your formula as it is not will return "PAID" when meet criteria for Payment Status, if not then will return the date ([DATE OVERRIDE]) if this its length >0 (I suppose it checks if it is exist) if both of those criteria are not met then you adding 3 values.

So... where you want to add new rule for Day of the Week?
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Yes so the current formula looks to the Payment Status column to see if it says PAID and either brings back a date or if not, then looks to three columns to bring back a date. So from this I then want the result to be moved to the nearest friday, is this possible to do in the same formula? I can do it in separate columns but want to do it all in one formula?
 
Upvote 0
try this:

Code:
=IF([@[PAYMENT STATUS]]="PAID","PAID",IF(LEN([@[DATE OVERRIDE]])>0,IFERROR(A1+(7-WEEKDAY([@[DATE OVERRIDE]],16)),0),SUM(AT97,AS97,AU97))
 
Upvote 0
can you please upload small sample file so I can check what is wrong? you can use any of storage services, such as DropBox and then paste link here
 
Upvote 0
https://www.dropbox.com/s/vtm815oglwgrzp1/Payment Date Example.xlsx

The 'Expected Payment Date' is where I am trying to put in the formula. In the first row I have entered the column you provided above (with a ' as it is missing a parenthesis so wont work). The other cells highlighted yellow show how one of the formulas just brought it to 06-Jan-00.

The 'Friday Formula' column is what im trying to achieve but in one cell.
 
Upvote 0
Try this formula:
Rich (BB code):
=IF([@[PAYMENT STATUS]]="PAID","PAID",IF(LEN([@[DATE OVERRIDE]])>0,[@[DATE OVERRIDE]]+(7-WEEKDAY([@[DATE OVERRIDE]],16)),SUM(AT96,AS96,AU96)))

Adjust the red part as required
 
Upvote 0
your sum might have problem there as you have date format.

i might change it last part of formula
Code:
SUM(AT96,AS96,AU96)
to
Code:
TEXT(SUM(AT96,AS96,AU96),"0.00")
this will add those 3 cells and will show result with 2 decimal places.
 
Upvote 0

Forum statistics

Threads
1,215,155
Messages
6,123,331
Members
449,098
Latest member
thnirmitha

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