using percentages in an if statement

M

matt

Is there a way I can incorporate the percentage of values that meet a
critiera into an If statement. For instance, say I've got

1
2
3
4
5
6
7
8
9
10

Is there any way that I can return TRUE if 90% of the values are larger than
1, but FALSE if less than 90% are greater than 1?
 
B

Biff

Hi!

Really don't need an IF:

=COUNTIF(A1:A10,">1")/COUNT(A1:A10)>=0.9

But, IF you really want one:

=IF(COUNTIF(A1:A10,">1")/COUNT(A1:A10)>=0.9,TRUE)

You might also want to make sure there are enough values in the range so
that you don't get an error return:

=IF(COUNT(A1:A10)<1,"",IF(COUNTIF(A1:A10,">1")/COUNT(A1:A10)>=0.9,TRUE))

Biff
 
Top