+ Reply to Thread
Results 1 to 5 of 5

Average by year if data in the same year

  1. #1
    Registered User
    Join Date
    03-21-2017
    Location
    Cambodia
    MS-Off Ver
    MS Office 2016
    Posts
    13

    Average by year if data in the same year

    Hi excel experts,

    I am trying to find an easy way, but shortcut to calculate average by year the data that are in the same year.

    Please check my attached example sheet for easy play around.

    Kind regards,
    Sarin
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Average by year if data in the same year

    Please try at S4

    =AVERAGEIFS(C4:Q4,C$3:Q$3,">="&DATE(YEAR(B4),1,1),C$3:Q$3,"<"&DATE(YEAR(B4)+1,1,1))

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,004

    Re: Average by year if data in the same year

    In S4, an array fromula, copied down:

    =AVERAGE(IF(YEAR($C$2:$Q$2)=YEAR(B4),C4:Q4))

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,004

    Re: Average by year if data in the same year

    Bo Ry's is better. Go with it.

  5. #5
    Registered User
    Join Date
    03-21-2017
    Location
    Cambodia
    MS-Off Ver
    MS Office 2016
    Posts
    13

    Re: Average by year if data in the same year

    Thank you both, really helpful.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Tediously adding data to a table year-over-year, looking for pivot ideas..
    By 360 in forum Excel Charting & Pivots
    Replies: 24
    Last Post: 03-19-2017, 08:59 AM
  2. [SOLVED] countifs to find the total count between this year and last year for series of data
    By maher2014 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2016, 02:39 AM
  3. Automatically update year interval cycles from year to year
    By trumptight in forum Word Programming / VBA / Macros
    Replies: 8
    Last Post: 08-21-2014, 10:38 PM
  4. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  5. average for month, 1/4 year, year
    By miheec in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-10-2012, 06:34 PM
  6. [SOLVED] How to average data by year?
    By Ryleigh in forum Excel General
    Replies: 5
    Last Post: 07-11-2012, 11:00 AM
  7. Replies: 1
    Last Post: 08-18-2010, 02:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1