Rolling number of days out in 365 day period, for UK citizenship calculation

dkuz

New Member
Joined
Mar 30, 2023
Messages
5
Office Version
  1. 365
  2. 2021
Platform
  1. MacOS
Hi, I travel extensively for work and want to keep track of my days outside of UK for the citizenship application later on. I have the dates for the last 3 years already and want to add additional column, calculating the rolling days I'm out of the country within any 365 day period.
The data I have currently is Column B - departure date; Column C - arrival date; Column D - days outside UK on that trip. I want column F to show the rolling days within the 365 day period, and am completely lost how to arrange the formula.
Can you help please?


Screenshot 2023-03-30 at 14.37.34.png
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUMIFS(D$4:D4,B$4:B4,">"&D4-365)
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUMIFS(D$4:D4,B$4:B4,">"&D4-365)
Hi,
Thank you!
This just gives me continuous cumulative days away.
I think the formula needs to have a condition set around current date and last calendar year within each data but that's where I am getting confused.
 
Upvote 0
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Schedule of Absence template 2020(81).xlsx
BCDF
7DepartureArrivalTrip lengthRolling 12 months
8n/a
911/21/2011/30/208
101/20/212/11/2121
112/11/214/5/2152
127/27/218/30/2133
139/18/219/25/216
1411/7/2111/13/215
152/11/224/2/2249
164/27/225/4/226
175/23/225/31/227
187/10/227/15/224
197/17/228/31/2244
2010/27/2211/4/227
2111/23/2212/19/2225
221/15/231/25/239
233/5/233/21/2315
244/2/234/27/2324
Dates (edit this page)
Cell Formulas
RangeFormula
D9:D24D9=MAX(0,DATEDIF(B9,C9,"d")-1)
 
Upvote 0
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Posted above!
 
Upvote 0
Thanks for that. Got the last bit wrong, it should be
Fluff.xlsm
BCDEF
7DepartureArrivalTrip lengthRolling 12 months
8n/a
921/11/202030/11/202088
1020/01/202111/02/20212129
1111/02/202105/04/20215281
1227/07/202130/08/202133114
1318/09/202125/09/20216120
1407/11/202113/11/20215125
1511/02/202202/04/20224993
1627/04/202204/05/2022699
1723/05/202231/05/20227106
1810/07/202215/07/20224110
1917/07/202231/08/202244154
2027/10/202204/11/20227122
2123/11/202219/12/202225142
2215/01/202325/01/20239151
2305/03/202321/03/202315117
2402/04/202327/04/202324141
Main
Cell Formulas
RangeFormula
D9:D24D9=MAX(0,DATEDIF(B9,C9,"d")-1)
F9:F24F9=SUMIFS(D$9:D9,B$9:B9,">"&B9-365)
 
Upvote 0
Thanks for that. Got the last bit wrong, it should be
Fluff.xlsm
BCDEF
7DepartureArrivalTrip lengthRolling 12 months
8n/a
921/11/202030/11/202088
1020/01/202111/02/20212129
1111/02/202105/04/20215281
1227/07/202130/08/202133114
1318/09/202125/09/20216120
1407/11/202113/11/20215125
1511/02/202202/04/20224993
1627/04/202204/05/2022699
1723/05/202231/05/20227106
1810/07/202215/07/20224110
1917/07/202231/08/202244154
2027/10/202204/11/20227122
2123/11/202219/12/202225142
2215/01/202325/01/20239151
2305/03/202321/03/202315117
2402/04/202327/04/202324141
Main
Cell Formulas
RangeFormula
D9:D24D9=MAX(0,DATEDIF(B9,C9,"d")-1)
F9:F24F9=SUMIFS(D$9:D9,B$9:B9,">"&B9-365)
Incredible!! Thank you so much, spent hours trying to work it out myself. 🥳
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,217
Messages
6,123,670
Members
449,115
Latest member
punka6

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top