View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Eduardo Eduardo is offline
external usenet poster
 
Posts: 2,276
Default Calculating Averages based on criteria

Hi,
try

=AVERAGEIF(E6:E9,"Y",D6:D9)

change the range to fit your needs

if this helps please click yes, thanks

"Kgov" wrote:

I'm trying to calculate an average based on some criteria in the adjacent
columns. The user has to first identiy Y or N and then determine if the
average should be calculated based on 2, 3 or 4 years.

Is there a formula that would only averge the correct number of cells 2, 3
or 4 years depending on what the user picked and divide by the right #?