SOLVED

Countifs doesn't work. if statement works

Copper Contributor

I have 3 cells with numbers E20 is 5, F20 is 2 and Y20 is 3.

 

In cell Z20:

=IF(Y20>F20,IF(Y20<E20,1,"")) gives me 1

However,

=COUNTIFS(Y20,">F20",Y20,"<E20") gives me 0

 

I can't figure out what happened. I have checked using isnumber() that all values are in fact numbers. 

I need to use the countifs formula, please help. 

2 Replies
best response confirmed by Yulius (Copper Contributor)
Solution

@Yulius 

That should be:

=COUNTIFS(Y20,">"&F20,Y20,"<"&E20)

 

@Detlef Lewin Thank you so much! it works now!!

1 best response

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

@Yulius 

That should be:

=COUNTIFS(Y20,">"&F20,Y20,"<"&E20)

 

View solution in original post