There is no need to use AND
This formula
=AVERAGEIFS(A2:A10,B2:B10,">=20",B2:B10,"=<50")
will average the values in the A range when the corresponding B values lie
in the interval 20 to 50
best wishes
--
Bernard Liengme
Microsoft Excel MVP http://people.stfx.ca/bliengme
REMINDER: These newsgroups are about to die. We will all meet again at http://social.answers.microsoft.com/Forums/en-US/category/officeexcel