Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unique Month Numbers

Status
Not open for further replies.

GSCaupling

Technical User
Sep 5, 2008
296
US

Is there a function or addin for Excel (2013) that returns a unique number for each month, similar to how days are counted from 1/1/1900? I don't mean the Month function that returns "6" for June no mater what year it is. I need every month to have a unique, consecutive number.

For example, today, 6/23/2014, is DayNumber 41813. I'm looking for something that identifies January 1900 as Month #1, June 2014 as Month #1374, next month as 1375, etc.

Any thoughts?

Thanks,
GS

[Green]******^*******
[small]I[/small] [small]Hate[/small] [♥] [small]Ambiguity.[/small][/green]
 
hi,

=1900-YEAR(SomeDate)+MONTH(SomeDate)

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
oops

[tt]
=(1900-YEAR(SomeDate))*12+MONTH(SomeDate)
[/tt]

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 

This works for me, Skip: =(YEAR(somedate)-1900) *12 + MONTH(somedate)

Thanks!

[Green]******^*******
[small]I[/small] [small]Hate[/small] [♥] [small]Ambiguity.[/small][/green]
 
Sorry for getting that transposed. [blush]

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Could this be an alternative solution ?
=ROUNDUP(YEARFRAC(DATE(1900;1;1);somedate)*12;0)

Respectfully,
Vilhelm-Ion Praisach
Resita, Romania
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top