View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Sean Timmons Sean Timmons is offline
external usenet poster
 
Posts: 1,696
Default Conditionals containing variables

Sounds easiest using a pivot table

Click anywhere within your table

Data - Pivot Table

Drop your products into row fiels and your amounts into data fields.

Right-click within one of the cells with an amount and select Field Settings

Click Average.

click the Number btton to format as needed.

"ChevyChem" wrote:

I have a dataset with over 1000 records contained in two columns. First
column is product name...second column is a measured quantitiy for that
product. Originally the data was accumulated over time, but they have been
sorted to group the products. I need to average the measured quantity for
each product. I can do it by hand but short of VBA is there a way to go
through and have an average for each measured quantity for each product done
automatically.

ex. ProdA 1
ProdA 3
ProdA 2
ProdB 4
ProdB 6
I can see comparing the product names in an IF statement but it seems it
will require a variable in the IF to get it to average each product
separately.