Short answer: use one row per trip, count days as return date minus departure date minus 1, and check the 365-day period ending on each trip. The formula below does that.
Download the free CSV template
Columns
| Column | What goes in it |
|---|---|
| A | Destination |
| B | Date you left the UK |
| C | Date you returned |
| D | Whole days away (formula) |
| E | Days away in the 365 days up to the end of this trip (formula) |
Formula for column D (row 2)
=IF(C2="","",MAX(0,C2-B2-1))Formula for column E (row 2)
=IF(C2="","",SUMPRODUCT(((($C$2:$C$200-1)-(($C$2:$C$200-1)>(C2-1))*(($C$2:$C$200-1)-(C2-1)))-(($B$2:$B$200+1)+(($B$2:$B$200+1)<(C2-365))*((C2-365)-($B$2:$B$200+1)))+1>0)*((($C$2:$C$200-1)-(($C$2:$C$200-1)>(C2-1))*(($C$2:$C$200-1)-(C2-1)))-(($B$2:$B$200+1)+(($B$2:$B$200+1)<(C2-365))*((C2-365)-($B$2:$B$200+1)))+1)))Copy both formulas down. Then look at the largest number in column E: that is your highest total in any 12 months.
Rules for using it
- Enter real dates, not text. If a formula shows an error, check the date format.
- Trips must not overlap, or days are counted twice.
- It covers rows 2 to 200 and trips that have both dates.
- It does not apply exceptions, or the different treatment of permission granted before 11 January 2018.
Check the result
Put the same dates into the free calculator. If the two totals differ, look for a typing mistake before relying on either.
Official sources
Check your own dates
Add your trips to the free calculator. Nothing is sent anywhere.
Open the calculator