title: I would like to take averages of values in a column depending on values in the cells of another column
body: <p>I have large amounts of data relating to an experiment I am performing in a stepwise manner. I would like to take the averages of each step however they are all in the same column so cannot simply take the average of a whole column. Fortunately the data logger I am using can log statuses in another column for each data point. </p>
  
  <p>I was thinking a vba would be able to discern each step from the others by reading the statuses which correspond to each data point (and I can have different statuses for each step: ie Step 1; Step 2; Step 3 etc), then calculate the average and output it in a specific cell. </p>
  
  <p><a href="https://i.stack.imgur.com/qjhpW.jpg" rel="nofollow noreferrer">this is a simplified version of the type of worksheet I will be looking for</a></p>
  
  <p>I have tried all the average functions in excel itself and I don't think they are suited to what I want them to do. Therefore I assume that I will  have to use either for or if loops in an excel macro, which is fine, but I'm quite new to programming and in particular VBAs and I just don't know where to start!</p>