SOLVED

COUNTIF Dates within dates plus condition.

Copper Contributor

Hi, 

 

I´m struggling a bit with the formula to calculate my conditions. I´ve attached an example file to giv an understanding. 

 

My conditions are two date columns (A & B) and one date row (H6:ID6). I have four hypothetical sales persons (C6:F6) whom get marked with an "x" (C7:F7 and down) if they do a sale within the given date range in my columns. 

 

My headache is how to calculate the number of "ongoing sales" per day each salesman have (HI:ID4). 

 

So the critera of an "x" within a date range needs to meet that the dates in the date row occurs during the range and then calcuate the number of occurrences of "x" during that specific date. 

 

Anyone that has some valuable input on how to build this formula? 

 

Kind regards,

Viktor 

 

 

3 Replies
best response confirmed by viktor2170 (Copper Contributor)
Solution

@viktor2170 

In the attached file, the formula in H1 is: 

=COUNTIFS($A$8:$A$334,"<="&H$6,
$B$8:$B$334,">="&H$6,
$C$8:$C$334,"x")

The formulas in H2:H4 are similar, then copied across columns until Column ID.

@Twifoo 

 

Thank you so much for this!!! This solved the problem.

 

Kind regard,

Viktor 

You’re very much welcome!
1 best response

Accepted Solutions
best response confirmed by viktor2170 (Copper Contributor)
Solution

@viktor2170 

In the attached file, the formula in H1 is: 

=COUNTIFS($A$8:$A$334,"<="&H$6,
$B$8:$B$334,">="&H$6,
$C$8:$C$334,"x")

The formulas in H2:H4 are similar, then copied across columns until Column ID.

View solution in original post