Thread: Summing up Data
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Summing up Data

Try this. Be sure to array enter by using ctrl+shift+enter instead of just
enter

=AVERAGE(IF((A2:A22="china")*(B2:B22="lost"),C2:D2 2))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Tom K" wrote in message
...
I will ask my question through an example:

Possible countries: China, United States, Russia
Possible customer types: Lost, Standard
Questions: Q1, Q2

So a few data records may look like this:

Country Type Q1 Q2
China Lost 5 4
China Standard 4 3
China Lost 2 3
Russia Standard 5 4
Russia Lost 3 3

Let's say I have a file with 5,000 records in it, all with a mix of
the countries and customer types above.

Someone comes and asks: "I want to know the mean score of the data at
Question 1 amongst people who are in the country China with a customer
type of Lost". (from the example above, the answer would be 3.5 -
the average of Records 1 & 3)

How would I accomplish this? Note that my project goes much deeper
than this, but I figure if I can just get a basic foundation, I'll be
able to build the rest (if this is even possible in the first place)

Thanks for ANY assistance!

Tom