Using dates - If a calculated date falls on a weekend, how do I get Excel to return the date of the Friday before?

andrewrgmartin

New Member
Joined
Jun 18, 2012
Messages
6
Hi, I'm putting together a cash flow forecast and am trying to work out the payment dates for our invoices based on invoice date + terms (30, 60, 90 etc) + paydate (some are paid on the 1st, some on the 3rd, some every Thursday, and some on the last working day of the month). At the moment some of my calculated payment dates fall on a weekend. How do I get Excel to give me the Friday date rather than say the Saturday or Sunday date? All help appreciated.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
use weekday([date], 2) to get the day of the week with Monday as day 1, Sunday as Day 7, and max() to convert days 6 and 7 to day 5.
 
Upvote 0
Thanks MisterBates and Domski. The table below shows an invoice that is on 120 day terms and is paid on the 3rd working day of the following of the following month. The result shows that the payment is due on a Saturday. Can you explain how I incorporate your formula in to mine to ensure the result is always a week day please?

ABCD
13invoice date22/6/12
2payment date=EOMONTH(D1,4)+B1
3result3/11/12

<TBODY>
</TBODY>

Thanks,
Andrew
 
Upvote 0
Try:

=EOMONTH(D1,4)+B1-CHOOSE(WEEKDAY(EOMONTH(D1,4)+B1,2),0,0,0,0,0,1,2)

Dom
 
Upvote 0
Cheers Dom. Now that I have a result that is a week day I'd like to use that date and get Excel to compare it to a fixed table of dates and then return the next available one. i.e I have a separate table of dates that are all Thursdays. If i pay a supplier every Thursday and my calculated payment date works out to be a Wednesday, how do I get Excel to return the date of the next Thursday? Thanks for your continued help, Andrew
 
Upvote 0
Thanks, that's great. How about if I want it to return the 3rd working day of the month (needs to ignore weekends and bank hols)? I already have a table that lists these dates, can I link to it via a Lookup?
 
Upvote 0
You could probably use WORKDAY function for some of these, e.g. if payment date is

=EOMONTH(D1,4)+B1

you can make sure that falls on a weekday by using this formula

=WORKDAY(EOMONTH(D1,4)+B1+1,-1)

For third workday of the month what are your inputs, or is it the 3rd workday of the month after a certain date? If it's the latter then with a list of 3rd workdays (in ascending order) in Z2:Z100 you can get the next one on or after a date in A1 by using LOOKUP, i.e.

=LOOKUP(A1,Z2:Z100)
 
Upvote 0
You could probably use WORKDAY function for some of these, e.g. if payment date is

=EOMONTH(D1,4)+B1

you can make sure that falls on a weekday by using this formula

=WORKDAY(EOMONTH(D1,4)+B1+1,-1)

For third workday of the month what are your inputs, or is it the 3rd workday of the month after a certain date? If it's the latter then with a list of 3rd workdays (in ascending order) in Z2:Z100 you can get the next one on or after a date in A1 by using LOOKUP, i.e.

=LOOKUP(A1,Z2:Z100)

The first two formulas worked ok, but unfortunately the 3rd returned a date before the value in A1. My table is in ascending order, e.g. 5/1/12, 3/2/12, 5/3/12 etc - any ideas?
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,702
Members
449,048
Latest member
81jamesacct

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