Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default calculate weekdays only

On Tue, 21 Sep 2004 13:55:02 -0700, "benb"
wrote:

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.



=WORKDAY(A1,-1)

If this function is not available, and returns the #NAME? error, install and
load the Analysis ToolPak add-in.

How?

On the Tools menu, click Add-Ins.
In the Add-Ins available list, select the Analysis ToolPak box, and then click
OK.
If necessary, follow the instructions in the setup program.

--ron
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
calculate weekdays only Mike Excel Programming 2 September 21st 04 11:09 PM
calculate weekdays only Tom Ogilvy Excel Programming 0 September 21st 04 10:19 PM
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 04:52 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"