average calculation

G

Guest

using the formula below i've been able to get the sum of column B if the
corresponding cell in column A says "spring". my question is
how can i do the same thing but to get the AVERAGE instead of the SUM.

=SUMPRODUCT(--(A2:A14="spring"),(B2:B14))
 
B

Biff

Hi!
=SUMPRODUCT(--(A2:A14="spring"),(B2:B14))

Better:

=SUMIF(A2:A14,"spring",B2:B14)

Best:

C1 = spring

=SUMIF(A2:A14,C1,B2:B14)

For the average:

=SUMIF(A2:A14,C1,B2:B14)/COUNTIF(A2:A14,C1)

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

help copying formulas 1
Sum Worksheets 7
Subtraction Question 2
Weighted Average 7
Find Average using Sumproduct 3
Find and average 2
SumIf formula from one column based on criteria from two other col 10
Excel Sumproduct 0

Top