Thread: xl macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JWolf JWolf is offline
external usenet poster
 
Posts: 136
Default xl macro

How about using worksheet functions to calculate average as follows:

=SUMIF(A1:A1000,"apples")/COUNTIF(A1:A1000,"apples")

mcb wrote:

How do i write a macro that will move to each cell in a
column and, if the value meets a certain "IF" requirement,
select it and add it to the data range for the "average
function" to evaluate? (for xl 97)