View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default COUNT IF but not if 'X' IS NULL

You can use an array-entered AVERAGE(IF(... formula to do this - give
details of the columns used for the vehicle name and for the mpg and I
can give you the rest of it.

Pete

On Aug 1, 12:33*pm, Pyrite wrote:
Hi,

I have a list of vehicle types and a list of MPG figures. I want to do an
average MPG for each vehicle type so I need to know not only how many of the
vehicle type there are but also how many of that type of vehicle have an MPG
figure with them.

E.g. I have 132 Peugeot vehicles, if I total the MPG figures and divide by
132 that gives me the average but only if every one of the Peugeots has a
figure for that month which they dont. For this reason I need to know how
many of those 132 have a figure with them. As the Peugeots are in a list with
other vehicle types I first need to identify Peugeot then identify that MPG
is not null, then count those cells.