Average Array

N

Native

Hello,

Would like to calculate an average on an array based on a condition.

For example, if I do:

= SUM((Color="Red")*(Units))

I get the sum of all the units which are red....my arrays are Color
and Units

However, if I try:

= AVERAGE((Color="Red")*(Units))

I get a different answer than I would expect. It looks like this
formula sums up my units in red, but then counts the total number of
units to calculate the average.

Any suggestions?
 
B

Bernie Deitrick

Tex,

You're averaging a lot of Zero values.

Array enter - enter using Ctrl-Shift-Enter

=AVERAGE(IF(Color="Red",Units))

HTH,
Bernie
MS Excel MVP
 

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