I have prepared a Google Sheet that lists all flights I have taken in recent years, alongside the departing and arriving country:
| Date & time | From | To | Outbound country | Inbound country | Days in inbound country |
|---|---|---|---|---|---|
| 10/10/2020 12:45 | LGW | FCO | United Kingdom | Italy | 36 |
| 15/11/2020 17:45 | FCO | LGW | Italy | United Kingdom | 34 |
| 19/12/2020 20:00 | LGW | FCO | United Kingdom | Italy | 22 |
| 10/01/2021 17:45 | FCO | LGW | Italy | United Kingdom | 153 |
| 12/06/2021 20:20 | LGW | FCO | United Kingdom | Italy | 15 |
| 27/06/2021 12:45 | FCO | LGW | Italy | United Kingdom | 99 |
| 04/10/2021 21:35 | LTN | FCO | United Kingdom | Italy | 13 |
| 17/10/2021 14:10 | FCO | LHR | Italy | United Kingdom | 20 |
| 06/11/2021 06:55 | LGW | FCO | United Kingdom | Italy | 14 |
| 20/11/2021 10:20 | CIA | STN | Italy | United Kingdom | 21 |
| 11/12/2021 18:25 | LHR | FCO | United Kingdom | Italy | 51 |
| 31/01/2022 14:05 | FCO | LHR | Italy | United Kingdom |
I have then created a Pivot Table that summarises the days spent in each country per calendar year:
| Year | Italy | Jordan | United Kingdom | USA | Grand Total |
|---|---|---|---|---|---|
| 2018 | 49 | 5 | 216 | 21 | 291 |
| 2019 | 48 | 306 | 15 | 369 | |
| 2020 | 58 | 307 | 365 | ||
| 2021 | 93 | 293 | 386 | ||
| 2022 | 0 | 0 |
It seems to be working well. The problem is dealing with the end of the year.I will not take a flight every year on the 1st of January, so there will always be days in January that are counted as previous year's days. For example the days in 2022 are counted as 2021.
Any ideas on how I can deal with the "end of year" problem?
Here's the link to the Google Sheet:https://docs.google.com/spreadsheets/d/1seH0A13AqhY41_mCcgqncHdoCWqU21lDnKQwtz3oCZM/edit?usp=sharing
Thanks!