Hello,

I have a problem finding a formula for this scenario:

example data:

Quantity Color
1 white
-1 white
1 black
1 white

in one cell, if value in column Quantity is positive I want to count number of color white in column Color. I came up with this formula:

=IF(Quantity>0; COUNTIF(Color; "=white")

but this formula does not seem to be working (I use column names as a substitute of range here for simplicity).


I hope I explained my problem clearly.
Anyone has any suggestions?

Thanks in advance,