On a EN-US regional system, what does B or b represent in a format mask? While it does nothing in VBA's Format function, both the TEXT function and Custom Number Formatting recognize b as a legal Number Format Code and return a number that I cannot determine the origin of.
To further confuse matters, larger numbers return different values when formatted with bbbb and while blocks of sequential numbers return the same value, there are transitions when they jump ahead a digit. I do know that Excel expects the format mask to be either bb or bbbb because if B or b is supplied as a custom number format Type: then it is corrected to bb and the same goes for BBB or bbb being corrected to bbbb.
??
If you look at the digit transitions in the above image then this must have something to do with calendar years and leap years. The transitions appear to generally be 365 between them except for every fourth which is 366. Is the 24 the number of leap years since 01-Jan-1900 according to the current system clock?
Might this be a format mask character for a non-Gregorian calendar system? I can find no documentation (official or otherwise) on the subject.
I've been told that this behavior is not exhibited on all systems. For me, this occurs in both XL2010 Pro Plus and XL2013 Pro Plus (both EN-US 64 bit Office on 64 bit EN-CA OS)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…