Conditional Formulas For Averaging

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create a formula that will look for a particular condition in
one column, and if that condition exists, then average the numbers from a
different column for the same row. As an example, one column contain the
names of multiple sales people, the other column contains the number of units
each one sold each day. I want the formula to average the number of units
sold for each person's name. So, if "Joe" sold 10 units one day and 20 units
another day, the formula would indicate that Joe sold 15 units.
 
=SUMPRODUCT(--(A1:A1000="Joe"),B1:B1000)/SUMPRODUCT(--(A1:A1000="Joe"))

or

=AVERAGE(IF(A1:A1000="Joe",B1:B1000))

The second is an array formula, so is committed with Ctrl-Shift-Enter

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
I am trying to create a formula that will look for a particular condition in
one column, and if that condition exists, then average the numbers from a
different column for the same row. As an example, one column contain the
names of multiple sales people, the other column contains the number of units
each one sold each day. I want the formula to average the number of units
sold for each person's name. So, if "Joe" sold 10 units one day and 20 units
another day, the formula would indicate that Joe sold 15 units.

Here's one way:

Column of Names is named 'Names'
Column of Units is named 'Units'

=SUMIF(Names,"Joe",Units) / COUNTIF(Names, "Joe")

"Joe" (without the quotes) can be in a cell, also.


--ron
 

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

Excel Subtracting multiple columns from another column 3
Average Array 1
Formula Problem 1
help with a formula 2
Arrays and Average 3
averaging data in multiple columns 6
Average Last 12 Columns 5
if condition 5

Back
Top