• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Calculate remaining months in a year

la la na

New Member
I need a calculation for the number of dates between a certain date and the end of that year. For example, if column A has the date that someone became a member of the program, I want column B to state how many months are between that and December.


Currently I am using this:

=MONTH(Z1)-MONTH(A1)


A1= the month a person became a member

Z1=December 2012


There are multiple problems with this formula, these two are the most problematic:

1. Only works for memberships beginning in 2012

2. Does not account for A1 being sometimes being blank


I would like to be able to use the same formula for everyone, regardless of what year they joined.
 
Let me google that for you.

and here we go. let us know if you have problems.


http://support.microsoft.com/kb/214134
 
See if this helps: =DATEDIF(A1,B1,"md")


For variations of datedif, you can explore,


http://office.microsoft.com/en-us/help/datedif-function-HA001160981.aspx


Amritansh
 
out of curiosity... why would their Start Month be blank?


not sure if this has been resolved... but i've played with just a couple months (specifically ones beyond the year 2012 and it seems to be working...when a date is available

=IF(ISBLANK(A1),"Starting Month Needed",($G$1-A1)/30)


I have the 12/31/12 entered in G1 and as you indicate, the Startup months in column A.

if a cell in Col A is empty, it will return the text "starting month needed"...obviously that can be changed to whatever you prefer. NOTE: i also put '/30' as a general number for the length of a month.... so there is some error here since every month does not have 30 days (i'm trying to see if i can have the formula find the length of each month).
 
Back
Top