• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

dragging only workdays

ver

New Member
Hi,

Please help me find a simple solution to beable dragging only workdays.

Means, not only without Saturday, but also Sundays or Fridays or any other days at the week which the person doesn't work.

tnx
 
Hi Ver,


Firstly welcome to the chandoo.org


How will you come to know that a person did't worked on any day. can you upload a sample file?? Just upload it on some file sharing site and paste link here!


Thanks,

Faseeh
 
Hi,


Take a look here


http://chandoo.org/forums/topic/working-days-with-fridays-and-saturdays-as-offs
 
Assumptions:

First date is manually entered into A2. List of non-working days is entered into B2:B7 as the the full name for days of week (e.g., Friday, Saturday, Sunday).

Formula in A3:

=A2+MIN(IF(ISNA(MATCH(TEXT(A2+ROW($E$1:$E$7),"dddd"),$B$2:$B$8,0)),ROW($E$1:$E$7)))


This is an array formula, confirm using Ctrl+Shift+Enter, not just Enter.

The cell reference E1:E7 within the ROW function can be any column, it simply needs to reference rows 1:7. The B2:B8 is where user inputs non-working days.
 
Hi, tnx for the answers, I learned a lot. But, it still didn't solve my problem.

I just wanted to write a date, for example: 29/02/12

and then to drag it down, missing Fridays and Saturdays.

While the only option I found was without Saturdays and Sundays.

I want the table to be:


Wedn 29/02/12

Thur 1/03/12

Sun 4/3/12

Mon 5/3/12

Tue 6/3/12

Wedn 7/3/12

Thur 8/3/12

Sun 11/3/12


etc.

I don't need the days names, it was only to make it clearer.

tnx
 
Ver


Assuming your date 29/2/12 is in A2

in A3 put =WORKDAY.INTL(A2,1,7)

Copy down
 
Hui,

That function doesn't appear in my XL (2007). Was it added in 2010, or is it perhaps an UDF?


Ver,

Please see the formula I posted above. It should give you what you want. To get the correct cell format, you'll need a custom format of:

ddd m/d/yy
 
Ah, something nice to look forward to. Glad to see Microsoft finally address this problem.
 
Hi Luke

This is the Help for Workday.intl

I'm sure you'll like the flexibility it now offers


WORKDAY.INTL function

Returns the serial number of the date before or after a specified number of workdays with custom weekend parameters. Weekend parameters indicate which and how many days are weekend days. Weekend days and any days that are specified as holidays are not considered as workdays.


Syntax

WORKDAY.INTL(start_date, days, [weekend], [holidays])The WORKDAY.INTL function syntax has the following arguments (argument: A value that provides information to an action, an event, a method, a property, a function, or a procedure.):


Start_date Required. The start date, truncated to integer.

Days Required. The number of workdays before or after the start_date. A positive value yields a future date; a negative value yields a past date; a zero value yields the start_date. Day-offset is truncated to an integer.

Weekend Optional. Indicates the days of the week that are weekend days and are not considered working days. Weekend is a weekend number or string that specifies when weekends occur.


Weekend number values indicate the following weekend days:weekend-number Weekend days

1 or omitted Saturday, Sunday

2 Sunday, Monday

3 Monday, Tuesday

4 Tuesday, Wednesday

5 Wednesday, Thursday

6 Thursday, Friday

7 Friday, Saturday

11 Sunday only

12 Monday only

13 Tuesday only

14 Wednesday only

15 Thursday only

16 Friday only

17 Saturday only


Weekend string values are seven characters long and each character in the string represents a day of the week, starting with Monday. 1 represents a non-workday and 0 represents a workday. Only the characters 1 and 0 are permitted in the string. 1111111 is an invalid string.


For example, 0000011 would result in a weekend that is Saturday and Sunday.


Holidays Optional. An optional set of one or more dates that are to be excluded from the working day calendar. Holidays shall be a range of cells that contain the dates, or an array constant of the serial values that represent those dates. The ordering of dates or serial values in holidays can be arbitrary.
 
Hui,

Ah, I'm very envious. I've seen a few previous attempts at trying to create custom workdays using native functions and UDF's, but this is so much simpler.
 
hi guys,

Thank you so much for the answers. It's really easy and cool.


* I've waited to announcement at my email and surprised that you answer so fast, while I'm

waiting outside :)


Good Week!

(Tommorow- Sunday is a regular working day, haha)
 
Back
Top