ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   calculate weekdays only (https://www.excelbanter.com/excel-programming/310804-re-calculate-weekdays-only.html)

Tom Ogilvy

calculate weekdays only
 
=A1-1-choose(Weekday(A1)-1,2,0,0,0,0,0,1)

--
Regards,
Tom Ogilvy



"benb" wrote in message
...
I am looking for code to insert yesterday's date if yesterday was a

weekday,
and to use the previous Friday's date otherwise (if yesterday was Sunday).
Anyone know how to do this? Thanks.





All times are GMT +1. The time now is 04:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com