Hey everyone,
I have a spreadsheet containing both valid and invalid data and have created a column indentifying the valid data using If statements. I want to make a column containing the average of the previous 720 valid data points. For example, column A is data, column B is the valid flag, and column C will be my average. Let's say cells A1 through A720 are valid, cells A721 through A741 are invalid, and the following data is all valid. Cell C720 should return "average(A1:A720)" and cells C721 through C741 should be blank. For the following cells, cell C742 should return "average(A2:A720,A742)", cell C743 should return "average(A3:A720,A742:A743)". It's difficult to explain, I've attached a sample spreadsheet with an example of the desired results but using an average of 10 valid points so it's easier to work with.
I'm thinking there may be a way to do this using an if statement, but I have no idea. Any help is appreciated.
Bookmarks