Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Increment double dates - weekday only 2

Status
Not open for further replies.

dianemarie

Instructor
Jul 11, 2001
583
US
Hello, I need to fill (down a column) weekday dates where each weekday needs to be in there twice. Any quick way to do this? (Already tried all autofill options, couldn't make it work.) Example:

8/1/05
8/1/05
8/2/05
8/2/05
8/3/05
8/3/05
etc.

Thanks a lot!
 
What if you put your start date in A1, then in A2 put:

=IF(WEEKDAY(A1)=6,A1+3,A1+1)

Then copy that down...and do it again in column B.

Then combine the two columns and sort?

There might be a faster way, but that's not too bad.

Hope it helps...

Kevin
 
Format column A as date...

In A1 8/1/05
In A2 8/1/05

Starting in A3

=IF(AND(WEEKDAY(A2)<6,COUNTIF(A1:A2,A2)=2),A2+1,IF(AND(A2=A1,WEEKDAY(A2)=6),A2+3,A2))

fill down
 


Hi,

Assuming that your first date is in A1...
[tt]
A2: =A1+.5
[/tt]


Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
The other option was to simply fill as normal, then copy all the dates and paste underneath and then sort on date.

Regards
Ken...........

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Hey Skip, I just checked out your very simple but effective answer and it worked fine. It didn't give me only weekdays (ETID's did), but still. It was good to know. Thanks.
 


A simple IF could check the MOD Date 7 value and add 2 instead of .5 to skip the weekend.

Skip,

[glasses] [red]A palindrome gone wrong?[/red]
A man, a plan, a ROOT canal...
PULLEMALL![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top