Taking average of certain values in one Excel column based on values in another
<p>I have a (large) array of data in Excel of which I need to compute the average value of certain values in one column, based on the values of another column. For example, here's a snippet of my data:</p>

<p><a href="https://i.stack.imgur.com/EhkqT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EhkqT.png" alt="enter image description here"></a> </p>

<p>So specifically, I want to take the average of the F635 mean values corresponding with Row values of 1. To take it a step further, I want this to continue to Row values of 2, Row values of 3 etc.</p>

<p>I'm not familiar with how to run code in Excel but have attempted to solve this by using the following:</p>

<pre><code>=IF($C = "1", AVERAGE($D:$D), "")
</code></pre>

<p>which (to my understanding) can be interpreted as "if the values (anywhere) in column C are equal to 1, then take the average of the corresponding values in column D."</p>

<p>Of course, as I try this I get a formula error from Excel.</p>

<p>Any guidance would be incredibly appreciated. Thanks in advance.</p>