R
Ravens Fan
Here is my dilemma. I am averaging only the last three times something has
been produced. Sometimes months go by with no production. On those months I
donot want to show a average (since it did not run). The formula I'm using
averages three months of production and skips the blank months, but, it still
shows and average. I'm hoping someone can manipulate my formula and show me
how to put no data in months where there was no production.
This is the formula I'm using:
=AVERAGE(INDEX(A1:A100,LARGE(IF(A1:A100<>"",ROW(A1:A100)-ROW(A1)+1),MIN(C
OUNT(A1:A100),3))):INDEX(A1:A100,MATCH(9.99999999999999E+307,A1:A100)))
Column "A" (actual Rate) is what I want to average and column "B" (3 month
avg) is the answer to my formula. As you can see, after the first 2 months of
data the average repeats it's self. Is there a way to make it return a blank
cell if no production was in that month. Example: Under "3 Month Avg." it
should read 366, 351 and then blank cells till you get to the next production
month of 323 out of column "A". I hope this isn't to confusing and any help
will be greatly appreciated.
Note: These numbers will be charted, so I need to have blank cells not 0.
Actual Rate for 3 Mo Avg 3 Month Avg.
366 366
337 351
351
351
351
351
351
323 342
331 330
358 337
356 348
348
300 338
338
306 321
321
been produced. Sometimes months go by with no production. On those months I
donot want to show a average (since it did not run). The formula I'm using
averages three months of production and skips the blank months, but, it still
shows and average. I'm hoping someone can manipulate my formula and show me
how to put no data in months where there was no production.
This is the formula I'm using:
=AVERAGE(INDEX(A1:A100,LARGE(IF(A1:A100<>"",ROW(A1:A100)-ROW(A1)+1),MIN(C
OUNT(A1:A100),3))):INDEX(A1:A100,MATCH(9.99999999999999E+307,A1:A100)))
Column "A" (actual Rate) is what I want to average and column "B" (3 month
avg) is the answer to my formula. As you can see, after the first 2 months of
data the average repeats it's self. Is there a way to make it return a blank
cell if no production was in that month. Example: Under "3 Month Avg." it
should read 366, 351 and then blank cells till you get to the next production
month of 323 out of column "A". I hope this isn't to confusing and any help
will be greatly appreciated.
Note: These numbers will be charted, so I need to have blank cells not 0.
Actual Rate for 3 Mo Avg 3 Month Avg.
366 366
337 351
351
351
351
351
351
323 342
331 330
358 337
356 348
348
300 338
338
306 321
321