Count cells by weekends
Macro Title:
|
Worksheet Variable:
|
Worksheet Name:
|
Range Reference:
|
Weekday:
|
Output Cell:
|
First Comment:
' |
Second Comment:
' |
Sub Count_cells_by_weekends()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'apply the formula to count cells by weekends
ws.Range("D14").Formula = "=SUMPRODUCT((WEEKDAY(B5:B11,2)=C14))"
End Sub
Sub Count_cells_by_weekends()
'declare a variable
Dim ws As Worksheet
Dim ws As Worksheet
Set ws = Worksheets("Analysis")
'apply the formula to count cells by weekends
ws.Range("D14").Formula = "=SUMPRODUCT((WEEKDAY(B5:B11,2)=C14))"
ws.Range("D14").Formula = "=SUMPRODUCT((WEEKDAY(B5:B11,2)=C14))"
End Sub