gooniegirl180
Board Regular
- Joined
- Aug 13, 2003
- Messages
- 152
I have a row of dates from row C5:U5.
In column A are a list of products: column B contains a "Switch", Column C contains an average, and column W may or may not contain start date.
If the switch for a product is AVG, I want the result in column X to be the figure in column C. Easy.
If the switch for a product is FOR, I want the result in column X to be the average of the first 8 non-zero columns. Doable.
If the switch for a product is PRE, I want the result in column X to be the average of the first 8 non-zero columns from (and including) the start date onwards. If there are less than 8 non-zeros, such as in example G below, I want the average of the number of non-zero values. There may be any number of zero values from the start date before the values kick in, but I still want the average of the first 8 values.
Any help would be gratefully received! Thanks!
In column A are a list of products: column B contains a "Switch", Column C contains an average, and column W may or may not contain start date.
If the switch for a product is AVG, I want the result in column X to be the figure in column C. Easy.
If the switch for a product is FOR, I want the result in column X to be the average of the first 8 non-zero columns. Doable.
If the switch for a product is PRE, I want the result in column X to be the average of the first 8 non-zero columns from (and including) the start date onwards. If there are less than 8 non-zeros, such as in example G below, I want the average of the number of non-zero values. There may be any number of zero values from the start date before the values kick in, but I still want the average of the first 8 values.
Any help would be gratefully received! Thanks!