Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default How to subtract weekend days?

Hi simsjr;

Pasted below is the VBA help for the WeekDay method. As
long as your worksheet has the dates for each day you
should be able to use the method to add up the weekdays
instead of minusing the weekend days out.


WeekdayName Function


Description

Returns a string indicating the specified day of the week.

Syntax

WeekdayName(weekday, abbreviate, firstdayofweek)

The WeekdayName function syntax has these parts:

Part Description
weekday Required. The numeric designation for the day of
the week. Numeric value of each day depends on setting of
the firstdayofweek setting.
abbreviate Optional. Boolean value that indicates if the
weekday name is to be abbreviated. If omitted, the default
is False, which means that the weekday name is not
abbreviated.
firstdayofweek Optional. Numeric value indicating the
first day of the week. See Settings section for values.



Settings

The firstdayofweek argument can have the following values:

Constant Value Description
vbUseSystem 0 Use National Language Support (NLS) API
setting.
vbSunday 1 Sunday (default)
vbMonday 2 Monday
vbTuesday 3 Tuesday
vbWednesday 4 Wednesday
vbThursday 5 Thursday
vbFriday 6 Friday
vbSaturday 7 Saturday



Thanks,

Greg
-----Original Message-----
Hi,

I'd like to know if there's a way to make Excel subtract

weekend days when
calculating actual workdays.

For example, I have cells for the start date and end date

of a sales
forecast. Let's say it's for three weeks (21 days). Now,

what I'd like to do
is subtract the weekend days (there are 6 in this period)

to get the "15".

Now, if I was only doing a forecast for three weeks at a

time, I could just
have Excel subtract the 6 weekend days with a simple

subtraction formula.
However, we want this report to scale to any time period

and subtract any
weekend days that occur in that period.

Make sense? Is there a way to do this? I have Excel 97 if

that means anything.
.

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
Making weekend days working days - the system cuts the working tim Fluffy Excel Discussion (Misc queries) 1 May 30th 08 10:02 PM
changing weekend days Otaibi Setting up and Configuration of Excel 2 April 24th 07 09:52 AM
add days without adding weekend brian thompson3001 via OfficeKB.com New Users to Excel 11 March 8th 06 05:02 PM
Weekend days other than Sat Sun rkk Excel Worksheet Functions 15 January 25th 05 02:31 AM
How to subtract weekend days? No Name Excel Programming 0 September 16th 04 08:21 PM


All times are GMT +1. The time now is 05:41 PM.

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"