L
L
Lion2952017-08-16 16:16:48
Visual Basic
Lion295, 2017-08-16 16:16:48

How to display working days as a list in Excel?

It is necessary that the start date be indicated in cell a1 by hand. In the cell b1 end. And then we need magic that in column c will display a list of all working days in this range

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Fedoryan, 2017-08-16
@Lion295

Sub PrintWorkDays()
    Dim Counter As Long
    
    Counter = 1
    For i = Range("A1") To Range("B1")
        Select Case Weekday(i)
            Case 2 To 6
                Cells(Counter, 3).Value = i
                Counter = Counter + 1
            Case Else
        End Select
    Next i
End Sub

X
x67, 2017-08-16
@x67

Demo version , which includes no more than 37 days. Contact me for the full version

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question