If you promise that on February 29, 2018 you was not go anywhere, then let's count the cities.

Naming convention: To simplify the formula a bit, let's assign names to the work ranges, as shown in this picture.

The first step is very simple - to find the offset value from the column days to the desired year.
For last year and this year it will be very similar, differ only by -1:

```
MATCH(YEAR(TODAY())-1;YearsRow;0)
MATCH(YEAR(TODAY());YearsRow;0)
```

Finding the string with the current date will be not much more difficult:

```
MATCH(TEXT(TODAY();"MMM D");DaysColumn;0)
```

Now you can easily determine the ranges for counting - take the whole column of names of days, move right to the desired year and cut off the excess:

```
OFFSET(DaysColumn;MATCH(TEXT(TODAY();"MMM D");DaysColumn;0);MATCH(YEAR(TODAY())-1;YearsRow;0);ROWS(DaysColumn);1)
OFFSET(DaysColumn;0;MATCH(YEAR(TODAY());YearsRow;0);MATCH(TEXT(TODAY();"MMM D");DaysColumn;0);1)
```

Please note: it is assumed that there are no other data below the table of cities. Otherwise, the first formula will be a little more complicated - to limit the height of the OFFSET() range, you need to once again calculate the position of the current date using the MATCH()

Now, using the usual COUNTA(), count the number of non-empty cells in each of the subranges and sum up the values obtained

```
=COUNTA(
OFFSET(DaysColumn;
MATCH(TEXT(TODAY();"MMM D"); DaysColumn;0);
MATCH(YEAR(TODAY())-1;YearsRow;0);
ROWS(DaysColumn);1))
+ COUNTA(
OFFSET(DaysColumn;
0;
MATCH(YEAR(TODAY());YearsRow;0);
MATCH(TEXT(TODAY();"MMM D");DaysColumn;0);1))
```

Edit by @SM_Riga on 25.12.2018 19:55 with the permission of @JohnSUN

Please also find Demo spreadsheet with above mentioned functionality and also with how to make formulas easier demonstration, based on the different data structure.

This is an interesting question. But, unfortunately, you will not be able to get an exact answer without very complex calculations. The day of February 29 is to blame; its presence or absence in the year will distort the result of the formula. And to take into account the leap year, the formula will have to be very complicated. You should either come to terms with the fact that the result will differ slightly from the true value, or change the table with cities and dates so as to avoid appearing on February 29 in a non-leap year and not to miss this day in a leap year.

My first thought was the same, but now I think that 29.02 brings no any complications to calculations if you consider "last 12-months" or "during last year" period as a period between two same dates in two consecutive years (inclusive or exclusive first or last day of the period, just need to define it before and keep it in mind after), but not as 365/366 days before today (which will prompt you to find, if this period shall include 29.02 or not). If I understand author correctly, first column is

allpossible dates in year, so 29.02 is included as the possible option, but it stays empty almost forever :) And the same date is always on the same row. So one just needs to count populated cells below the current row in the previous column and above the current row in the current column. So during ...(more)