AmeliaBedelia
New Member
- Joined
- Apr 8, 2018
- Messages
- 19
I have hit a wall with how to create an average of only the last X number of data in a column. Most of the answers I have found online for this have formulas that either do not work or I am not able to understand what needs to be amended to fit my situation.
My spreadsheet is as follows:
Column A Column B
<tbody>
</tbody>
First I need to calculate the average for the Results column, but only for the last 5 results. The results and date columns will be dynamic as data will constantly be added to these columns, so I need it to constantly look for the last row and only use the last 5. Results will only either be a 1 (100%) or a 0 (0%). There will be no empty rows. I was hoping that the average could be placed in a cell above the heading "Results", but due to some formulas I have tried, this sometimes creates a circular reference and may not be possible. So I do have flexibility that I can post the average in another column.
I want the average to post even if the minimum number is not reached, which is 5 in this case.
For example,
First Result:
<tbody>
</tbody>
Second Result:
<tbody>
</tbody>
Third Result:
<tbody>
</tbody>
Fourth Result:
<tbody>
</tbody>
Fifth result:
<tbody>
</tbody>
Sixth Result:
<tbody>
</tbody>
Once there are a minimum of 5 results and it reaches an average of 80% I want the date next to the result that created the 80% to be posted into the cell above the Date heading.
So in this example, since the minimum # we want is 5, it is only after the 7th result where there is a minimum of 5 results and the average has reached an 80%, so I want the date to be posted above the Date heading:
<tbody>
</tbody>
Thanks
My spreadsheet is as follows:
Column A Column B
(Want Average to posted here as data is added to this column) | (Want the date where there is a minimum of 5 and an 80% average to be posted here) | |
Results | Date | |
0 | June 3 2018 | |
0 | June 4 2018 | |
1 | June 5 2018 | |
1 | June 5 2018 | |
1 | June 6 2018 | |
0 | June 7 2018 | |
1 | June 7 2018 |
<tbody>
</tbody>
First I need to calculate the average for the Results column, but only for the last 5 results. The results and date columns will be dynamic as data will constantly be added to these columns, so I need it to constantly look for the last row and only use the last 5. Results will only either be a 1 (100%) or a 0 (0%). There will be no empty rows. I was hoping that the average could be placed in a cell above the heading "Results", but due to some formulas I have tried, this sometimes creates a circular reference and may not be possible. So I do have flexibility that I can post the average in another column.
I want the average to post even if the minimum number is not reached, which is 5 in this case.
For example,
First Result:
0% | ||
Results | Date | |
0 | June 3 2018 |
<tbody>
</tbody>
Second Result:
0% | ||
Results | Date | |
0 | June 3 2018 | |
0 | June 4 2018 |
<tbody>
</tbody>
Third Result:
33% | ||
Results | Date | |
0 | June 3 2018 | |
0 | June 4 2018 | |
1 | June 5 2018 |
<tbody>
</tbody>
Fourth Result:
50% | ||
Results | Date | |
0 | June 3 2018 | |
0 | June 4 2018 | |
1 | June 5 2018 | |
1 | June 5 2018 |
<tbody>
</tbody>
Fifth result:
60% | ||
Results | Date | |
0 | June 3 2018 | |
0 | June 4 2018 | |
1 | June 5 2018 | |
1 | June 5 2018 | |
1 | June 6 2018 |
<tbody>
</tbody>
Sixth Result:
60% | (Want Date hit 80% here) | |
Results | Date | |
0 | June 3 2018 | |
0 | June 4 2018 | |
1 | June 5 2018 | |
1 | June 5 2018 | |
1 | June 6 2018 | |
0 | June 7 2018 |
<tbody>
</tbody>
Once there are a minimum of 5 results and it reaches an average of 80% I want the date next to the result that created the 80% to be posted into the cell above the Date heading.
So in this example, since the minimum # we want is 5, it is only after the 7th result where there is a minimum of 5 results and the average has reached an 80%, so I want the date to be posted above the Date heading:
80% | June 7 2018 | |
Results | Date | |
0 | June 3 2018 | |
0 | June 4 2018 | |
1 | June 5 2018 | |
1 | June 5 2018 | |
1 | June 6 2018 | |
0 | June 7 2018 | |
1 | June 7 2018 |
<tbody>
</tbody>
Thanks