Results 1 to 5 of 5

Thread: How to average dates across the year end

  1. #1
    Neophyte NormanW's Avatar
    Join Date
    Nov 2020
    Posts
    2
    Articles
    0
    Excel Version
    2007

    How to average dates across the year end



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I am keeping Phenology records using an excel spreadsheet.


    I have columns for successive northern hemisphere winters, 12018/2019, 2019/2020, 2020/21 etc Each cell is formatted as Custom Date: Type DD/MMM


    I have two rows for each of 70+ species and columns for each year with the end column for calculating the average date of an event and the average difference in days


    My formulae uses an array in the formula field {=AVERAGE(DATE(,MONTH(F14:I14),DAY(F14:I14)))} But this produces some strange results, for example 2nd May, for an average between 23rd December and 8th January


    Because this is about the first time an effect is noticed, in any spring period, it can be between late November in one year and late January in the following year, so crossing the year boundary. I suspect that the average is looking within years rather than between year

    Any suggestions for how I can correct this formulae would be much appreciated.


    Spring watch Croatia average calc.xlsx


    Thanks for reading

  2. #2
    Administrator Pecoflyer's Avatar
    Join Date
    Oct 2011
    Location
    Brussels Belgium
    Posts
    1,742
    Articles
    0
    Excel Version
    2010 on Xubuntu
    Hi and welcome
    Please,do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question

    Do not post any further responses in this thread until a link has been provided to these cross posts.
    Thank you Ken for this secure forum.

  3. #3
    Neophyte NormanW's Avatar
    Join Date
    Nov 2020
    Posts
    2
    Articles
    0
    Excel Version
    2007
    Quote Originally Posted by Pecoflyer View Post
    Hi and welcome
    Please,do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question

    Do not post any further responses in this thread until a link has been provided to these cross posts.

    Thank you for your reply. I haven't cross posted. I asked a question in OZ grid [https://www.ozgrid.com/forum/index.p...age-of-dates/]

    I received an answer which when I applied it, doesn't work. My question in this forum is different. after researching excel forums, this group was recommended as being larger and better, but perhaps the recommendation was incorrect?

  4. #4
    Administrator AliGW's Avatar
    Join Date
    Nov 2015
    Location
    Ipswich, Suffolk, England
    Posts
    1,531
    Articles
    0
    Excel Version
    Office 365 Subscription
    Thank you for the link. Your questions are very similar, so it would have been wise to provide the cross-post links up front. Many of the regulars here are regular helpers on multiple fora.
    Ali
    Enthusiastic self-taught user of MS Excel!

  5. #5
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,849
    Articles
    0
    Excel Version
    365
    You may not need an extra row for this; in say, cell M10, you can try this formula, which may need to be array-entered using Ctrl+Shift+Enter, rather than the more usual plain Enter, depending on your version of Excel:
    Code:
    =ROUND(AVERAGE(IF(NOT(ISBLANK($C10:$J10)),$C10:$J10-DATE($C$3:$J$3,1,0))),0)
    It uses row 3 which contains the year for each column, from which I calculate the beginning of the year and subtract it from the event date, so even if a date wanders into the following year it will return a number greater than 365 to be included in the averaging. For it to work well I've used ISBLANK to identify columns not to be taken into account, so make sure all cells without dates are truly blank.
    I've also used ROUND because if a date should average to say 350.9, the date returned (format the cell d-mmm) would be day 350, not 351.
    It won't be exact because of leap years etc. but it should give a good guide - test it with some dates where you've worked out the average manually.

    ps. I grew up in Elloughton; ring any bells with you?
    Last edited by p45cal; 2020-11-28 at 03:22 PM.

Tags for this Thread

Posting Permissions

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