A. Leyva
A. Leyva

Reputation: 5

Count day of week between dates from another column in excel

Consider the following sheet:

        A        B      C    D      E
  --------------------------------------- 
  |                        Non
  | Start    End      Mon  Mon
 1| Date     Date     Vac  Vac  Vacation
  |                   Days Days Days 
 2| 11/16/17 11/30/17   1   2   11/21/2017
 3| 12/1/17  12/15/17   0   0   11/22/2017
 4| 12/16/17 12/31/17   0   4   11/27/2017
 5|                             12/26/2017
 6|                             12/27/2017
 7|                             12/28/2017
 8|                             12/29/2017

What formula can I put in cells C2:D4 to get the values needed?

Notes:

Upvotes: 0

Views: 50

Answers (1)

QHarr
QHarr

Reputation: 84465

Might the following work in C2?

=SUMPRODUCT(--(WEEKDAY($E$2:$E$8,2)=1),--($E$2:$E$8>=A2),--(‌​$E$2:$E$8<=B2))

Here it is deployed in sheet with UK date format:

data

Upvotes: 1

Related Questions