View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Arrays and Averages

Hi,

=AVERAGE(IF(B1:B20="US",C1:C20))

I think the average of 5+3 is 4 but perhaps that's just me :)

This is an array formula which must be entered with CTRL+Shift+Enter and NOT
'just enter. If you do it correctly then Excel will put curly brackets around
'the formula{}. You can't type these yourself. If you Edit the ranges
'then you must re-enter as An array

Mike

"PAL" wrote:

I have a table 30 rows, 3 columns

Col A is product name (3 products)
Col B is region name (US)
Col C is # Unit for each product (5)

Example

Cars US 5
Trucks US 3
Cars Europe 6

How create a formula that will give me the average number of units for the
sum of the products in a given region.

Output in example should be (5+3)/2 =4.5

Thanks.