AverageIf Help

J

JimS

I tried the following forumla (and many, many others) but it obviously
doesn't work.

=averageif(c15:c2500=b2,x15:x2500="e",n15:n2500)

I type a name into B2 that corresponds with some of the names in
Column C. When those names match an "e" in column X I then want to
average the corresponding values in column N.

An example:

b2 = zz
c15 = zz x15= e n15 = $10.00
c16 = zz x16= e n16 = $20.00
c17 = zz x17= p n17 = $30.00
c18 =aa x18 =e n18 = $ 5.00

Since x17 = p and doesn't meet the criteria, and because c18=aa and
also fails the criteria, I would then average the values in column N,
rows 15 and 16 getting $15 for an answer.
 
J

JimS

Thanks that helped me finsish up. I tried AverageIfS, but I couldn't
get the proper syntax. Here is my final formula and it does exactly
what I want. Much appreciated.

=IF(ISERROR(AVERAGEIFS(WIN!$N$15:$N$2500,WIN!$C$15:$C$2500,$B$2,WIN!$X$15:$X$2500,"e")),0,
(AVERAGEIFS(WIN!$N$15:$N$2500,WIN!$C$15:$C$2500,$B$2,WIN!$X$15:$X$2500,"e")))
 
R

Ron Rosenfeld

Thanks that helped me finsish up. I tried AverageIfS, but I couldn't
get the proper syntax. Here is my final formula and it does exactly
what I want. Much appreciated.

=IF(ISERROR(AVERAGEIFS(WIN!$N$15:$N$2500,WIN!$C$15:$C$2500,$B$2,WIN!$X$15:$X$2500,"e")),0,
(AVERAGEIFS(WIN!$N$15:$N$2500,WIN!$C$15:$C$2500,$B$2,WIN!$X$15:$X$2500,"e")))

Since you obviously have XL2007+, perhaps:

=IFERROR(AVERAGEIFS(WIN!$N$15:$N$2500,WIN!$C$15:$C$2500,$B$2,WIN!$X$15:$X$2500,"e"),0)

--ron
 
J

JimS

Thanks, Ron. I just now learned that and was going to post. You beat
me to it. Thanks for the help.
 

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

Top