Excel 2078 ( Excel 2007 ).
=SUM(IF(DAY(ROW(OFFSET($A$1,TODAY(),0,DATE(YEAR(TODAY()),12,31)-TODAY()+1)))={1,16},1,0))
. = 1 16 1 ( , DAY()).
{ ... < > Ctrl + Shift + Enter }
[]
(, 15 ), :
=SUM(IF(DAY(ROW(OFFSET($A$1,TODAY()+1,0,DATE(YEAR(TODAY()),12,31)-TODAY()+1)))={1,16},1,0))
Ps I tested all dates from today through leap day 2016 onwards and it works. All of these are test line numbers processed as a date using a function DAY()to see if they are 1 or 16, but the serial number is offset by +1, so it really checks if DAY()[the last day is any month] or 15. If the result is correct, add 1, otherwise add 0.
[more add-ons]
The following are non-array versions that otherwise work the same way:
Includes the current day:
=SUMPRODUCT(N(DAY(ROW(OFFSET($A$1,TODAY(),0,DATE(YEAR(TODAY()),12,31)-TODAY()+1)))={1,16}))
Excludes current day
=SUMPRODUCT(N(DAY(ROW(OFFSET($A$1,TODAY(),0,DATE(YEAR(TODAY()),12,31)-TODAY()+1)))={1,16}))