I feel like I'm losing my mind!
I'm trying to find the number of days in a month, but none of my formulas are responding properly.
For example,
=DAY(DATE(YEAR(2018),MONTH(2)+1,1)-1)
Should return 28
=DAY(DATE(YEAR(2018),MONTH(4)+1,1)-1)
Should return 30
=DAY(EOMONTH(A2,0)) (assuming A2 is 2)
Should return 28
NONE of these are working. They all return 31
My workbook calculations are all set to automatic, I'm not seeing any errors, my clock is set properly on the PC.
I try to evaluate the formula =DAY(DATE(YEAR(2018),MONTH(2)+1,1)-1), and this is what it says happens:
=DAY(DATE(YEAR(2018),MONTH(2)+1,1)-1)
=DAY(DATE(1905,1+1,1)-1)
=DAY(DATE(1905,2,1)-1)
=DAY(1859-1)
=DAY(1858)
=31
It makes absolutely no sense.
Bookmarks