+ Reply to Thread
Results 1 to 9 of 9

Rolling 12 month Absences

  1. #1
    Registered User
    Join Date
    01-29-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Rolling 12 month Absences

    Good Morning,

    Relatively new to the endless possibilities of excel but I am learning fast. For my current scenario I would very much appreciate some assistance though.

    My data appears as follows:

    A1: Date of departure from the UK
    B1: Date of return to the UK
    C1: Difference between A1 & A2

    The result is 5 years worth of data detailing travel in and out of the UK.

    What I want to achieve is a figure in D1 that sums the total days outside of the UK over the past 365 days. In essence a rolling 12 month total of absences.

    I have used SUMIFS to attempt to solve this but the issue I have is highlighted below using an example.

    15/12/16 - 26/12/16 - 11 days
    19/12/17 - 25/12/17 - 6 days

    Counting back 365 days from 25/12/17 and then summing anything in column C would result in the entire 11 day absence from 2016 being included in the total when in reality, I only want 1 day of it as that is all that falls in the last 365 days.

    Any help to work out how I can solve this would be great.

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Rolling 12 month Absences

    =SUM(IFERROR(($B$3:$B$789-IF($A$3:$A$789<$D$1,$D$1,$A$3:$A$789))^0.5,)^2)
    as array formula
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    01-29-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Re: Rolling 12 month Absences

    Thanks Tim201110

    I have tweaked the document to give a better idea of what I am trying to achieve.

    I can't quite get it right in the 12 month rolling column - any tips?
    Attached Files Attached Files

  4. #4
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Rolling 12 month Absences


  5. #5
    Registered User
    Join Date
    01-29-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Re: Rolling 12 month Absences

    Sorry to go on tim201110 but I am still stuck on this.

    As you can see, the values in the 12 month rolling column do not look right at all.

    Most grateful for any help you can provide.
    Attached Files Attached Files

  6. #6
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Rolling 12 month Absences

    i can't see it
    could you put right figures manually

  7. #7
    Registered User
    Join Date
    01-29-2018
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    5

    Re: Rolling 12 month Absences

    thanks again tim201110

    I could alter manually but I plan to use this on a much bigger data set and hence the need to have an automatic process.

    Are you able to see the spreadsheet now - the values just look completely wrong and I cannot work out why.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,855

    Re: Rolling 12 month Absences

    Hello stairali and Welcome to Excel Forum.
    Tim is asking you to manually put values in column E so that we may attempt to write formulas and/or code to automate the process. I am guessing that those values should be 2,3,5,22,30 and 35.
    To that end I modified Tim's array entered formula* so that it reads: =SUM(IFERROR(($B$3:$B3-IF($A$3:$A3<$D3,$D3,$A$3:$A3))^0.5,)^2)
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Rolling 12 month Absences

    If JeteMc has guessed the correct figures this works also. In E3 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    By any chance are the expected figures 2, 3, 5, 22, 30 and 5

    If so try this formula in E2 and fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 01-31-2018 at 12:15 AM.
    Dave

+ 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] Create dynamic rolling 3 month data that increases in one month increments
    By v_pilling in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 03-24-2017, 01:33 PM
  2. Replies: 3
    Last Post: 11-11-2016, 07:46 PM
  3. Replies: 1
    Last Post: 01-08-2015, 09:40 AM
  4. Replies: 3
    Last Post: 07-16-2014, 02:53 PM
  5. Replies: 10
    Last Post: 08-25-2013, 02:29 PM
  6. how to calculate the total absences within a year per month
    By paularhea09 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-31-2013, 08:32 AM
  7. Replies: 2
    Last Post: 11-30-2005, 04:15 PM

Tags for this Thread

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