View Single Post
  #6   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Fri, 29 Jul 2005 15:49:03 -0700, "matt"
wrote:

What I have is a list of the jobs that we have bid for multiple months on a
single spreadsheet. Included in this imformation is a column with the date
and a column with the price. What I would like to do is have a function that
will return the average bid price for each month.

I know how to count the number of bids for each month, but I don't know how
to extract the prices out of the price column for the corresponding date.

ex. sheet

job bid date bid price
001 6/23/05 $5656
002 6/26/05 $7878
003 7/2/05 $4523
004 6/30/05 $6756

Question: how do I write a function that will look at the jobs in June and
take the average of their bid prices, excluding the price of the job in July?


With some date in June in A1, you could use an array formula:

=AVERAGE(IF(MONTH(bid_date)=MONTH(A1),bid_price))

To enter an *array* formula, hold down <ctrl<shift while hitting <enter.

In the above formula, you may substitute SUM and/or COUNT for AVERAGE to obtain
these other parameters.


--ron