Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weekdays Kerryn Excel Discussion (Misc queries) 7 July 5th 08 01:56 AM
Weekdays only! rexmann Excel Discussion (Misc queries) 2 August 14th 07 02:52 PM
Date, Weekdays Heckstein Excel Discussion (Misc queries) 3 September 11th 05 10:21 PM
Weekdays Jeff Excel Discussion (Misc queries) 7 February 15th 05 12:18 AM
Calculate weekdays from two dates JZ[_2_] Excel Programming 1 October 16th 03 09:26 PM


All times are GMT +1. The time now is 03:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"