Year/Month/Date Question

Is there a formula that can calculate years, months and days into a decimal? 
For example: 23 years, 6 months, 0 days would be 23.5 years.
0
Utf
11/18/2009 1:50:02 AM
excel.misc 78881 articles. 5 followers. Follow

4 Replies
831 Views

Similar Articles

[PageSpeed] 14

Depends on how your years, months and days are stored.

Assuming they're in cells A1 (years), B1 (months) and C1 (days), then this 
formula would get you close:
=A1+((B1*30)+C1)/365.25
That will actually return 23.49281, which if you round to 1 decimal place is 
23.5

If you want to gty to get closer use B1*30.4375 instead of B1*30, since 
365.25/12 = 30.4375 which you can "assume" is the average number of days in 
any single month.


"Mike" wrote:

> Is there a formula that can calculate years, months and days into a decimal? 
> For example: 23 years, 6 months, 0 days would be 23.5 years.
0
Utf
11/18/2009 2:27:01 AM
>For example: 23 years, 6 months, 0 days
>would be 23.5 years.

I assume the days will be less than "a months worth of days". You won't have 
something like this:

23 years, 6 months, 72 days

So, how many days are in a month? 28, 29, 30 or 31?

What result would you expect from this:

23 years, 6 months, 29 days

Is this: 23 years, 6 months, 0 days, all in one cell?

How about posting several representative samples along with the results you 
expect. As you can see there are a lot of details that need to be 
considered!

-- 
Biff
Microsoft Excel MVP


"Mike" <Mike@discussions.microsoft.com> wrote in message 
news:F8CC49E3-6893-4E9B-8CC9-42FC46F90505@microsoft.com...
> Is there a formula that can calculate years, months and days into a 
> decimal?
> For example: 23 years, 6 months, 0 days would be 23.5 years. 


0
T
11/18/2009 2:36:26 AM
Thanks!!

"JLatham" wrote:

> Depends on how your years, months and days are stored.
> 
> Assuming they're in cells A1 (years), B1 (months) and C1 (days), then this 
> formula would get you close:
> =A1+((B1*30)+C1)/365.25
> That will actually return 23.49281, which if you round to 1 decimal place is 
> 23.5
> 
> If you want to gty to get closer use B1*30.4375 instead of B1*30, since 
> 365.25/12 = 30.4375 which you can "assume" is the average number of days in 
> any single month.
> 
> 
> "Mike" wrote:
> 
> > Is there a formula that can calculate years, months and days into a decimal? 
> > For example: 23 years, 6 months, 0 days would be 23.5 years.
0
Utf
11/18/2009 3:09:01 AM
An answer to the month length problem might be to change your formula to 
=A1+B1/12+C1/365.25

You might change the 365.25 to 365.2425 too.

But of course it depends what the OP really wants.
-- 
David Biddulph


"JLatham" <JLatham@discussions.microsoft.com> wrote in message 
news:18DD2A51-CD3C-41BB-8719-43F80A71F268@microsoft.com...
> Depends on how your years, months and days are stored.
>
> Assuming they're in cells A1 (years), B1 (months) and C1 (days), then this
> formula would get you close:
> =A1+((B1*30)+C1)/365.25
> That will actually return 23.49281, which if you round to 1 decimal place 
> is
> 23.5
>
> If you want to gty to get closer use B1*30.4375 instead of B1*30, since
> 365.25/12 = 30.4375 which you can "assume" is the average number of days 
> in
> any single month.
>
>
> "Mike" wrote:
>
>> Is there a formula that can calculate years, months and days into a 
>> decimal?
>> For example: 23 years, 6 months, 0 days would be 23.5 years. 


0
David
11/18/2009 10:34:37 AM
Reply:

Similar Artilces:

Could I install MM Delux in the next year on the new maschine?
I thing my previous mail it the above subject gonne into the net:( So I reapet the question - my MM Delux Plus expires 11.10.2009. Could I install this MM on the new maschine in the nex year - I am goin go buy the new computer with Win 7. Greetings If you have available Activations you obtained prior to 6/30/2009 and activate prior to 1/31/2011, this is correct. Oh, and be sure and do an Internet Update to get the patches prior to 1/31/2011. One strategy I would recommend considering: install the M+ in a Win7 XP VPC VHD. Then protect that VHD file very carefully so that you might be a...

formatting date
Hey, is there any way to format this date 2005 so that it only shows the year number 5 thanks If you select the cells you want in date format, then right click on them and select Format Cells and select the "number" tab, then select Category, Date, you'll see all the date formats that come with XL. I used to know how to create custom date formats, but it's been so long, I don't remember how any more. ...

Overlay 4 years of data as a line on 4 years of columns for several x category labels
Dear Charting aficianados, The tutorial at http://peltiertech.com/Excel/Charts/ClusterColAndLine.html is the closest example I can find to a charting conundrum I am facing, though what I am hoping to achieve is still a little different. I've made a mock up of what I'm hoping to achieve - though I have had to use drawing objects for the line series, to overlay on the columns - I'm sure there is a way to get excel to do this - do you think there is? (sheet named mock-up) A workbook with mocuk-up and my other charting attmempts can be found: http://www.savefile.com/files/2690840 T...

month & year format in two digits
Hi folks.... is this possible in excel that if I just type MM/YY without this "/" and it appears as MM/YY. For example if I type 0805 in the cell it should appears as 08/05 once entered. Help will be appreciated. Thanks Morphyus -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.aspx/ms-excel/200508/1 http://www.cpearson.com/excel/DateTimeEntry.htm -- Kind regards, Niek Otten Microsoft MVP - Excel "Morphyus C via OfficeKB.com" <forum@OfficeKB.com> wrote in message news:5264F31820670@OfficeKB.com... > Hi folks.... > is this possible i...

PX_Blob Question
When using PX_Blob where is the data actually stored? Kurt ...

Changing Date
My Outlook seems to be stuck on last Friday. When I have gotten a new message over the weekend, it still considers that it was received on Friday August 1, 2003 at the corresponding time. Has anyone ever experienced this? ...

Data Points regarding DATES
I have numerous graphs wherein the X Axis represents the DATE. When I scroll my mouse along the graph line (searching for data points), I often see the accompanying data as... Series 1 Point "39409" Value 209 instead of: Series 1 Point "22-Nov" Value 209 HOW CAN I AVOID THE REFERENCE ON THE DATA LINE FROM REFLECTING THE SERIAL NUMBER INSTEAD OF THE DATE ITSELF??? (such as "22-Nov".) Thanks, FLKulchar F Lawrence ...

Posting to prior years
I have the all years closed until 2006 (calendar year setup) Is there any way to post entries to 2003. This is requirement due to restatement of financials for prior years. Thanks Sunil The only way to accomplish this is to contact Microsoft Professional Services (you can do this through your GP Partner) and have them re-open your closed years. We've had them do this for a customer of ours - worked out very well. -- Victoria Yudin Dynamics GP MVP Flexible Solutions, Inc. "nfp" <nfp@discussions.microsoft.com> wrote in message news:ADD8C19D-BBCC-43BD-987E-3AC352...

Year to year comparison in Money 2003
Hello. I can't seem to generate a report that would allow me to do a year by year comparison of income and spending. I'd like to have all my categories in rows, with two columns for 2002 and 2003 next to one another. Any advice? I can't seem to figure out how to do two different time frames like that. Disregard. I figured it out. Would have been weird if it weren't possible. The Report section (print, lay-out, export to Excel) could be a little better. "Iron Flatline" <tiredofvirusspam@anonymousnewsgroupreader.org> wrote in message news:%23PqlM1I4DHA.1644...

last downloaded date and balance
After I import my bank's OFX file, the balance and date under the "Downloaded:" title at the top left corner(while viewing my account), do not update to the most current information. I looked into my bank's OFX file. The XML seems have the necessary information to update the downloaded balance and date. It used to work before. It seems to have stopped updating after my bank changed formats from OFC to OFX. I am not sure though. Any help is highly appreciated. I am experiencing the exact same problem. Please let me know if you find a solution. >-----Original M...

Multiple workbooks question
I am trying to create a report that will pull information from the same cell and row in many (at least 75, all with different file names) different workbooks. I have looked in the help option, but nothing is working. Any help would be great. -- Bambi Hi Bamby Try http://www.rondebruin.nl/summary2.htm Or http://www.rondebruin.nl/copy3.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Bambi Williams" <BambiWilliams@discussions.microsoft.com> wrote in message news:12136AB3-5D8F-46BC-A644-5DB46A80788D@microsoft.com... >I am trying to create a report that will p...

Having a date column with just month and year
I have a database of publications in Access. I want to change the date published column to just month and year instead of the way it is now--date, month and year. We don't have exact dates books were published, so the date part doesn't really serve a purpose. But I can't find a way of doing this. I'm using Access 2003. Thanks, Suroor keep the data type as Date/Time, but then change the Format to: mm-yyyy that would store 01-2010, 02-2010, etc you can setup the format to whatever makes sense to you. yyyymm, yyyy- mm, mm/yyyy, mm-yy, etc. Thanks! ...

Duplicated date
Hi It's any function of queries to check then delete the duplicate date in one field? -rgds Mohsin -- Cheers Mohsin Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200710/1 You cannot 'delete' a field, you can delete the WHOLE record, but not a single field in a record. You can SET a field to a NULL value, though. If there is 'a', one, duplicate row, there are TWO of them. Unless you have some means to differentiate them somehow, any SQL statement would affect BOTH rows. So, basically, use an UPDATE query that wi...

You cannot mark this year as historical year as open year balances exist for it
Hi.. Actually While loading the Data , we didn't marked the Year 2003 as historical year. Hence , when we have loaded the 2003 GL data in the company , it has not transfered the balances to Year 2004. When we try to mark the year as historical year, it is giving the message that "You cannot mark this year as historical year as open year balances exist for it." Kindly suggest how to resolve this problem. Thanks Running the General Ledger Year-End Closing process for 2003 should bring the balances forward for 2004 and make 2003 an historical year. Before performing a y...

Update Month
Hello, I need help designing a VBA macro that would the following: I have in row C5 "From January 2005 to xxxx" I'd like to replace or update xxxx by the current month, which I have in cell A2. Thanks, Jeff, If A2 is a date: Range("C5").Value = "From January 2005 to " & Format(Range("A2").Value, "mmmm yyyy") If A2 is a string: Range("C5").Value = "From January 2005 to " & Range("A2").Value HTH, Bernie MS Excel MVP "Jeff" <Jeff@discussions.microsoft.com> wrote in message news:...

function udf with date and time
Hi, How can I program a udf function that counts the hours between two times knowing that they can occur on the same day or in several days. Example: Start 1/1/2009 10:30 End 1/2/2009 9:30 The function should calculate 23 hours, also minutes Thanks guys > How can I program a udf function that counts the hours between two > times knowing that they can occur on the same day or in several days. See Chip's page for examples: http://www.cpearson.com/excel/DateTimeWS.htm Do you really need a UDF for that? If the start date and time is in A1 and B1 and the end da...

xy scatter
I have an xy scatter chart, which is plotting info for 3 different series. My end date is 2006, yet the X axis shows an end date of 2008. I have not plotted any data for 2007, or 2008. The years appear on my x axis with no info plotted on the y axis. Any ideas how to adjust to reflect just up to the actual date of 2006? Thanks, Alicia I saw your other post. Could you paste a sample of the data for the three series? - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Alicia" <A...

Simple Logging Question
We recently changed our company name and hence our domain name. We have e-mail successfully being delivered when addressed to olddomain.com and newdomain.com as per our default recipient policy. Before phasing out the old domain, we want to see how many messages are still being addressed to *.olddomain.com for a period of say 3 months. How do we do that? Thanks! On Thu, 22 Dec 2005 08:51:02 -0800, Tim <Tim@discussions.microsoft.com> wrote: >We recently changed our company name and hence our domain name. We have >e-mail successfully being delivered when addressed to ol...

Excel Question
This is probably a silly question, but I can't figure it out. In Office 2000 in Excel when you select two columns and right click it included the option to "Unhide" or "Hide". In Office XP in Excel I can not select two columns it automatically expands the selection to include the Merged Row above it which includes all the columns below - not just the two I selected. When I select just two cells the right click does not include the option to "Unhide" or "Hide". I have to go to the format menu, select column and select "Unhide" or &q...

Graph displaying dates alphabetically on x axis, not by date
Hello! Title says it all - I want the x axis to show dates in DATE ORDER, not alphabetical order. I've read thru the forum, can't see how to fix it - your help will be appreciated. Kind Regards, Russell. p.s. Here is the graph Row Source, should there be an ORDER BY statement in here? SELECT (Format([Date Paid],"mmm"" '""yy")) AS Expr1, Sum([Tenant Payments]. Amount) AS SumOfAmount FROM [Tenant Payments] GROUP BY (Format([Date Paid], "mmm"" '""yy")), [Tenant Payments].[Date Paid], (Year([Date Paid]...

Restoring a DC over a year old, Event 8012.
Hi, I never usually have any issues cloning a curretn DC, however I need to restore one that is over 1 year old for our Law team. I think it has something to do with a tomestone of 60 days on the System State, what can I do? I did think about changint the servers clock before restoring. Hello Whiteford, Is that the only DC in the network? Basically you will loose all configuration since then and also all computers have to be readded to the domain, because they loose there machine password. If you have additional DCs, forget the restore that way and better install ...

Dates
I am working on a spreadsheet that consists of a rolling 12 mont period. Once a month has passed how do I delete it and add a new mont to the 12 month period? Please help -- ~~ Message posted from http://www.ExcelForum.com You have to provide more info on how your data is laid out. Tell us what you have and tell us what you want to have when the month changes. HTH Otto "erodri02" <erodri02.y6nsy@excelforum-nospam.com> wrote in message news:erodri02.y6nsy@excelforum-nospam.com... > > I am working on a spreadsheet that consists of a rolling 12 month > period. Once...

Number of the day of the year
I need a formula that will look at a date and tell me what number day it is in that year. eg 31/1/2007 would show as 31. 1/3/2008 is 61. It is sort of like a julian date but without the year part of the number. Thanks Try the below with date in cell A1 =DATEDIF(DATE(YEAR(A1),1,0),A1,"d") -- Jacob (MVP - Excel) "NDBC" wrote: > I need a formula that will look at a date and tell me what number day it is > in that year. eg 31/1/2007 would show as 31. 1/3/2008 is 61. It is sort of > like a julian date but without the year part of the numbe...

question about ipaddress crtl
hi i need to get an ip address from user and store it in class member variable, then connect to particular system for this purpose i put in a IPAddressCtrl contol object. what i need to know is how can i DoDataExchange that control with my class member variable thx in advance, Create a member variable and extract it using the appropriate member function. Forget about ever using DoDataExchange. If you need to return it from a dialog, just extract it in the OnOK handler. joe On Thu, 22 Apr 2004 06:01:04 -0700, "Adraj" <anonymous@discussions.microsoft.com> wrote: >hi,...

2004 Payroll Year end Closing
I tried to create the wage file for 2004 and Great Plains Tells me its already been set up. I did not create the file manually so what happen and can I run it again. has this happen to anyone else if so what do I do?-- DJohnson ------=_NextPart_0001_48A5960E Content-Type: text/plain Content-Transfer-Encoding: 7bit Are you referring to the Payroll Year End Wage File? You can view all existing wage files under Utilities > Payroll > Remove Year End Info. If 2004 is already listed here, you could remove it. Do not remove any other years that may be listed. Once 2004 has been r...