I am using
=MONTH(H6)
and have the format of the cell set to mm the value is
stuck at 01 and I cannot understand why.
=YEAR(H6) works fine.
Many Thanks
=MONTH(H6) returns a number in the range of 1-12.
When you format the cell as 'mm', Excel thinks you mean a date.
Excel stores dates as serial numbers where 1 = 1 jan 1900 (or 1904).
So when Excel sees a date that is in the range of 1-12, it interprets that as a
date in the range 1 Jan to 12 Jan 1900 (or 1904). So that function will always
return a 1 since the number represents the month of January.
It is only serendipity that YEAR(H6) appears to work. It is probably really
returning a year in the early 1900's.
Suggestion: format the cell as General.
--ron