Data Series for Dates not including Fridays

janki6566

New Member
Joined
Sep 24, 2014
Messages
21
Office Version
  1. 365
Platform
  1. Windows
Hello

Working on macro in which I have a start date and end date. I used the following code to fill only weekdays but the fill series does not inlcude Friday if that is the end date .


VBA Code:
    sh9 = ws1.Range("U" & xLoop).Value 'start date
    sh10 = ws1.Range("W" & xLoop).Value 'end date
    

     With ws2.Range("BA" & lr2)
        .Value = DateValue(sh9) + (Sh14)
        .DataSeries Rowcol:=xlColumns, Type:=xlChronological, Date:=xlWeekday, Step:=1, Stop:=DateValue(sh10 + 1), Trend:=False
     End With
 

Some videos you may like

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Watch MrExcel Video

Forum statistics

Threads
1,114,236
Messages
5,546,664
Members
410,753
Latest member
Ian R
Top