Thread: Mod function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave F Dave F is offline
external usenet poster
 
Posts: 2,574
Default Mod function

=Month(1/1/1900) would extract 1 from 1/1/1900, etc.

Dave
--
Brevity is the soul of wit.


"Brad" wrote:

I'm doing a date calculation where by 1 is January 1900, 2 is February 1900,
... 1281 is September 2006. I want to extract the month from the number.
The following works - but is there a better way (where I don't have to use an
IF)?

=IF(MOD(H3,12)<0,MOD(H3,12),12)