You will get an error if Flash Fill cannot find the pattern. The first thing to check is that you're using Flash Fill close to the source data (e.g., in the adjacent cell). For instance, it won't work ...
By dividing (/) the running total by the sequence number, Excel returns the average of all the values from the start to the ...