• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Offset/Count A function for average of 1st three months

Hi Chandoo Experts,

I saw a video on how to perform the Offset function with count a for the average of the last six months. But what I would like to know is how to set it up for the first three months. I've been experimenting with different width's figures but can't seem to come up with the correct answer. I'm probably way off base with this, so your input would be very helpful. I downloaded the file that i am working on and it is under the offset part 2 tab. The example is on top of the spreadsheet. Thank you.
 

Attachments

  • Formulas.xlsx
    17.2 KB · Views: 10
Hi,
The average of last 6 months returns 200 (the last value), while the average is 126.66667.
The formula =AVERAGE(OFFSET(A3,0,1,1,3)) is the one you need for first 3 months.

From Excel help on offset:
OFFSET(reference, rows, cols, [height], [width])
The OFFSET function syntax has the following arguments:

  • Reference Required. The reference from which you want to base the offset. Reference must refer to a cell or range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value.
  • Rows Required. The number of rows, up or down, that you want the upper-left cell to refer to. Using 5 as the rows argument specifies that the upper-left cell in the reference is five rows below reference. Rows can be positive (which means below the starting reference) or negative (which means above the starting reference).
  • Cols Required. The number of columns, to the left or right, that you want the upper-left cell of the result to refer to. Using 5 as the cols argument specifies that the upper-left cell in the reference is five columns to the right of reference. Cols can be positive (which means to the right of the starting reference) or negative (which means to the left of the starting reference).
  • Height Optional. The height, in number of rows, that you want the returned reference to be. Height must be a positive number.
  • Width Optional. The width, in number of columns, that you want the returned reference to be. Width must be a positive number.
You could use AVERAGEIFS function as well, and I think it will be easier.
 
Hi All,

Thank you for responding. It was for Jan, Feb, Mar. in the horizontal row. How about if i want to get the average for like Mar, Apr, May months?
 
Back
Top