View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default need help finding string them averaging the total

Hi,

Try,

=(SUMPRODUCT((A1:A500=E1)*(B1:B500))/COUNTIF(A1:A500,E1))

Where E1 is you search string

Mike

"brandon roland" wrote:

I have two lists , column A & B , in column A is the # for the product€¦ i.e.:
A334GHLZ , in column C I have the price for that product..

Now, there is always more than 1 instance of the product # because this list
is referencing what each product sold to DIFFERENT customers for..

So say the list looks like this

___COL A_____ _____COL B_____
ASF1234GHLZ 19.00
ASF1234GHLZ 20.00
ASF1234GHLZ 35.00
ASF1234GHLZ 21.00
B3223424LHZ 5.0

(expect my list is now about 2,000 entries)

I need to be able to type €śASF1234GHLZ€ť into a separate cell and I want
excel to find all instances on €śASF1234GHLZ€ť & get there prices
(19.00,20.00,35.00,21.00) , then add the prices together and give me the
average of the prices. There may be 1 instance of a product, or there may be
20 instances of the product.

I obviously know how-to do the math part in excel, what I dont know is how
to make it search for that criteria and gather all of the prices from the
adjacent cells then add & divide them.



Any and all help you can give me is greatly appreciated!

Thanks,
Brandon Roland