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.
 
Yes, sorry, LOOKUP will give you the previous date. Try either this "array formula"

=MIN(IF(Z2:Z100>=A1,Z2:Z100))

confirmed with CTRL+SHIFT+ENTER

...or a non array version

=INDEX(Z2:Z100,MATCH(A1-1,Z2:Z100)+1)

....or in fact you can get the next "3rd Workday" diectly without a list (except a holiday list) by using this formula in Excel 2007 or later

=LOOKUP(A1-1,WORKDAY(EOMONTH(A1,{-2,-1;-1,0}),3,H$1:H$10))

where H1:H10 contains Bank Holiday dates
 
Last edited:
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Yes, sorry, LOOKUP will give you the previous date. Try either this "array formula"

=MIN(IF(Z2:Z100>=A1,Z2:Z100))

confirmed with CTRL+SHIFT+ENTER

...or a non array version

=INDEX(Z2:Z100,MATCH(A1-1,Z2:Z100)+1)

....or in fact you can get the next "3rd Workday" diectly without a list (except a holiday list) by using this formula in Excel 2007 or later

=LOOKUP(A1-1,WORKDAY(EOMONTH(A1,{-2,-1;-1,0}),3,H$1:H$10))

where H1:H10 contains Bank Holiday dates

Thanks Barry, that was a great help.
 
Upvote 0
Formulae are beautiful things - Understanding them is PFM (Pure Friggin' Magic)!!!

I had a similar need: We run checks en masse every Friday, so I need something to calculate a "check run" date for a Friday at least 7 days prior to an invoice due date to allow for our USPS snail mail to pickup and deliver before the actual Due Date. I was able to modify Dom's first formula to accomplish this as follows:
=K6-CHOOSE(WEEKDAY(K6,2),10,11,12,13,7,8,9)

Thanks, Dom!
 
Upvote 0

Forum statistics

Threads
1,215,403
Messages
6,124,714
Members
449,182
Latest member
mrlanc20

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