View Single Post
  #1   Report Post  
J
 
Posts: n/a
Default AVERAGE(IF()) problem

i have two columns and want to search through a column for X and take the
average of all the cells that are next to X. for example:

W .2
X .4
X .3
T .9

the desired result is that the cell will have the value of the average of
cells next to X: (.4+.3)/2 = .35

when i type in AVERAGE(IF(col1="X",col2)) i end up with an average of all
values in col2 which is not what i want. any ideas? thanks in advance