Mod function

B

Brad

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)
 
B

Bernard Liengme

Is this homework? Try this
=MOD(H3-1,12)+1
and think why it works
best wishes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top