View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default Formula to figure an average on a range of cells with an "if" form

On Tue, 5 Aug 2008 11:40:00 -0700, lucyo912
wrote:

I have a spreadsheet that has a formula in column g that is an "if" formula
for the data in column f. I need to get an average of the data in column
"g". For example

column f column g
yellow 2
green 3
red 1
red 1
red 1
average yellow need formula for this

help!


Try this formula in cell G6:

=AVERAGEIF(F1:F5, "=yellow", G1:G5)

Hope this helps / Lars-Åke