View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default calculate average in a column based on criteria in another column

=AVERAGE(IF(A1:A20="x",B1:B20))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"sharon t" <sharon wrote in message
...
I want to calculate the average of numbers in one column based on

crieteria
in another colume.

If the value in column A = x, sum and average the corresponding values in
column B