here is the syntax for the functions you mentioned..

suppose you have range of cells 1 - 10 in A1:A10 and in B you have, alternating, A and B

COUNTIF = countif(range to count, criteria to base count on) =countif(A1:A10,2) will give 1, because there is only 1 "2" in that list

AVERAGEIF =averageif(range-containing-criteria,criteria,range-to-base-average-on) =countif(B1:B10,"B",A1:A10) will give 6, because all the values with B (2+4+6+8+10)/5 = 6

SUMIF =sumif(range-containing-criteria,criteria,range-to-sum) =sumif(B1:B10,"B",A1:A10) will give 30, because all the values with B (2+4+6+8+10) = 30

Hope that helps a bit?