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

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Watch MrExcel Video

Forum statistics

Threads
1,114,645
Messages
5,549,166
Members
410,902
Latest member
G Slim
Top