#### Calculate Years/Months Between Dates and then Average

We are using the formula =DATEDIF(A1,NOW(),"y") & "." &
DATEDIF(A1,NOW(),"ym") to calculate the years and months from an employee
hire date.

Is there an easy way to average the years and months for a group of
employees with the results of that formula?
 0
missy (16)
2/11/2005 4:35:12 PM
excel.misc 78881 articles. 5 followers.

3 Replies
1134 Views

Similar Articles

[PageSpeed] 4

You could use:

=AVERAGE(A1:A10*1)

Array-entered, meaning press ctrl-shift-enter.

But you could also just change your current formula to:

=1*(DATEDIF(A1,NOW(),"y") & "." & DATEDIF(A1,NOW(),"ym"))

Then just use:

=AVERAGE(A1:A10)

which is *not* array-entered.

HTH
Jason
Atlanta, GA

>-----Original Message-----
>We are using the formula =DATEDIF(A1,NOW(),"y") & "." &
>DATEDIF(A1,NOW(),"ym") to calculate the years and months
from an employee
>hire date.
>
>Is there an easy way to average the years and months for
a group of
>employees with the results of that formula?
>.
>
 0
jasonjmorin (551)
2/11/2005 5:09:31 PM
>  =1*(DATEDIF(A1,NOW(),"y") & "." & DATEDIF(A1,NOW(),"ym"))

I don't think that will work correctly. Here's the first problem: the formula
gives the same fractional part for both 1 month and 10 months, i.e. 5y1m =
5.1, 5y10m=5.1

But correcting the formula to give 5.01 and 5.10 will not work either.

Let's say you have these time intervals: 11y11m, 13y11m, 5y11m, 4y9m. If you
generate the decimal numbers 11.11, 13.11, 5.11, and 4.09, the sum is 33.42,
and 33.42/4 = 8.355. What does that mean? If the terminology is consistent, it
should mean 8 years and 35.5 months, or 10 years and 11.5 months.

But if you add the years and months separately, you get 33 years and 42
months, which is equivalent to 33 years + 3 years + 6 months = 36.5 years, and
the average is 9.125 years, or 9 years and 1.5 months.

Some suggestions for solutions:

1) generate the elapsed time in decimal years

=DATEDIF(A1,NOW(),"y")+DATEDIF(A1,NOW(),"ym")/12

2) generate the intervals in months, i.e. =DATEDIF(A1,NOW(),"m"), average the
months, then convert the average to years and months with =INT(X/12) and
MOD(X,12)

3) generate the interval as

=DATEDIF(A1,NOW(),"y")+DATEDIF(A1,NOW(),"ym")/100

(note the above gives 5.01 for 5y1m and 5.10 for 5y10m)

Then use the DOLLARDE function (from the ATP) to translate the numbers to
decimal years so they can be averaged correctly, and the DOLLARFR function to
convert the result back to the yy.mm format.

On Fri, 11 Feb 2005 09:09:31 -0800, "Jason Morin"
<jasonjmorin@OPPOSITEOFCOLDmail.com> wrote:

>You could use:
>
>=AVERAGE(A1:A10*1)
>
>Array-entered, meaning press ctrl-shift-enter.
>
>But you could also just change your current formula to:
>
>=1*(DATEDIF(A1,NOW(),"y") & "." & DATEDIF(A1,NOW(),"ym"))
>
>Then just use:
>
>=AVERAGE(A1:A10)
>
>which is *not* array-entered.
>
>HTH
>Jason
>Atlanta, GA
>
>>-----Original Message-----
>>We are using the formula =DATEDIF(A1,NOW(),"y") & "." &
>>DATEDIF(A1,NOW(),"ym") to calculate the years and months
>from an employee
>>hire date.
>>
>>Is there an easy way to average the years and months for
>a group of
>>employees with the results of that formula?
>>.
>>

 0
anonymous (74717)
2/12/2005 3:16:17 AM
On Fri, 11 Feb 2005 08:35:12 -0800, "Missy" <Missy@discussions.microsoft.com>
wrote:

>We are using the formula =DATEDIF(A1,NOW(),"y") & "." &
>DATEDIF(A1,NOW(),"ym") to calculate the years and months from an employee
>hire date.
>
>Is there an easy way to average the years and months for a group of
>employees with the results of that formula?

Since Months and Years have differing number of days, your answer will be
approximate in any event.

You could just average the number of days for each employee, and then convert
that to some approximation of years and months.

For example, if you have a bunch of hire dates in A1:A10, and the average year
has 365.25 days, and the average month has 365.25/12 days, then the array
formula:

=INT(AVERAGE(TODAY()-A1:A10)/365.25)+MOD(
AVERAGE(TODAY()-A1:A10),365.25)/365.25*12/100

should give you an answer in a similar format.

To enter an array formula, hold down <ctrl><shift> while hitting <enter>.  XL
should place braces {...} around the formula.

--ron
 0
ronrosenfeld (3122)
2/12/2005 4:19:31 AM

Similar Artilces:

Help with average formula
Hi, I'm trying to calculate average of figures as follows: 1.1.2003 10 2.1.2003 20 3.1.2003 15 4.1.2003 5.1.2003 5 So the question is that if there is one row that has no numbers in it how do I exclude it from the average... meaning that average would b counted like this (10+20+15+5)/4 and not (10+20+15+5)/5. Thanks //juh -- Message posted from http://www.ExcelForum.com Juha If a cell is blank, it won't be included in the average. Andy. "Juha" <Juha.ybp1y@excelforum-nospam.com> wrote in message news:Juha.ybp1y@excelforum-nospam.com... > Hi, > > I...

Calculating Taxes and Making calculations
Hello, Kindly plz tell me how do i go about making some small calculations based on my existing data such as how to compute taxes and do other calculations based on some quantitative data. where exactly do i make modifications on my application??? Kindly help me out. Thanks , swati you can add code in javascript behind dropdowns or piclist fields. One example might be a dropdown which has shipping options ie ups, fedex etc. When you choose one it takes the weight of your package (whcih you enter) then calculates a shipping cost. search the archives of this group at groups.google.com and ...

Procedure to calculate distance using latitude/longitude
Does anyone know of a vba procedure for access that will calculate straightline distance using latitude and logitude for 2 points? AJ wrote: > Does anyone know of a vba procedure for access that will calculate > straightline distance using latitude and logitude for 2 points? See: http://groups.google.com/group/microsoft.public.access/msg/6b934b0e580b974b James A. Fortune MPAPoster@FortuneJames.com ...

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. 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 mont...

average if with time
I have data sorted by date(mm/dd/yy) and time(hh.mm.ss) and I am tryin to write a function which will average every hour. How can I sor through the times and compute an average without getting all the 2 clocks, for example, as opposed to the hour on one particular day Thanks for the help, Andrew Moo -- Message posted from http://www.ExcelForum.com Need a little more detail. Maybe give me an example of what you have a data and then tell me what results you are trying to recieve from tha data! michae -- Message posted from http://www.ExcelForum.com I see your problem as having separate...

How to calculate age of a person?
Hi, I'm struggling to figure this one out. I have a date column and I'd like to be able to calculate the age without doing it in my head. I've tried to do this but am struggling. Any help will greatly appreciated. Thanks Suzanne Visit www.cpearson.com and search for DATEDIFF best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email "Grd" <Grd@discussions.microsoft.com> wrote in message news:6BFFD11C-AECB-4837-93B6-D84B6170B975@microsoft.com... > Hi, > > I'm struggling to figure this one out. I have...

EXCEL 2007 Formula to calculate INTEREST only on a 3 month bridge
I am trying to calculate monthly INTEREST ONLY payment on a short term bridge/swing loan. Assuming an interest rate of 2.75%, paid monthly, Also assuming it will be required for a 3-6 month period, amount approx \$500,000. Just switched to Excel 2007 but don't seem to be able to calculate using the formula builder. Not sure if it is compounded daily or monthly. You might want to check out the IPMT function. From the XL help file: IPMT(rate,per,nper,pv,fv,type) Rate is the interest rate per period. Per is the period for which you want to find the interest and must...

Due Date Calculated
I need assistance on an expression that allows for the due date of recurring training to be one year from date completed. Details are as follows: I have a form named [frmTRNComplete] based on table named [tblTRNComplete] Form controls are: TRNID (combo box), DateComp (Text Box) , DateNext (text box), Reccuring (check box) I would like the DateNext to be 1 year from DateComp if Reccuring is true and Date next to be blank if Reccuring is false. -- Aloha, Ron A. Ron I'll assume that you want to use the form to calculate the DateNext, and that you are not trying to s...

how to calculate outliers
Google is your friend: http://www.google.com/search?q=calculate+outliers - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "ismhs" <ismhs@discussions.microsoft.com> wrote in message news:035124A0-06FA-4153-932E-6C4E0614F38C@microsoft.com... > ...

Calculated field options???
Here's my Data: Country Status --------- ---------- Canada Green Canada Blue Canada Green Canada Green Canada Blue In my pivot table, 'Country' is an item, and 'Status' is my only data field. What I really need to show in my data area is two column of data, one for 'Green' and one for 'Blue'. I tried creating two 'Calculated' fields with the following formulas, but they don't seem to be working: 'CalculatedField1' = IF((STATUS="Green"),1,0) 'CalculatedF...

tenure calculations
how can I format several dates such as 04/19/2003, 04/01/2004, etc. int a yearly average for the employee tenure -- Message posted from http://www.ExcelForum.com right now say I have my yearly figures in i1-i9. The formula I though would work is =today()-average(i1:i9), but how would i format this to give me yearly read out -- Message posted from http://www.ExcelForum.com Hi djackson! One way is to use YEARFRAC with a third argument of 1 to get your tenures in years and fractions of a year and then average the result. However YEARFRAC does produce some annoying but small errors. Y...

Time Sheet Function to Calculate
I am having some trouble trying to establish a formula that will give me the number of hours worked during the day given the start time say 8.30am with an end time of 5.30pm and say 30 minutes for lunch. For this scenario, total working hours would be eight and a half hours but I need Excel to display this result as 8.30 hours (0.30 being the minutes in the half hour) and not 8.50. Can someone suggest what to do? Typically the layout would be Column A - Start Time say 8.30am Column B - Time in minutes spent at lunch say 30 minutes Column C - End Time say 5.30pm. Column D - the calculati...

Price History Chart
The data is here in Price History, why can't Money chart it for me? Am I missing something? for Money 2004? The default chart only shows a fixed time. If you right click and add the chart to your favorites, you should be able to customize the date range. -- Glyn Simpson, Microsoft MVP - Money http://money.mvps.org Check http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny for UK tips and fixes for MS Money. To send Microsoft your wishes or suggestions, use http://register.microsoft.com/mswish/suggestion.asp or http://www.microsoft.com/uk/support/money/feedback especially i...

Formula to calculate time
I was wondering if anybody knows of a formula to allow you to do calculations based on time. In other words, say I want to put a list of songs on a CD and their durations. Then, I want to add up the durations to get the full time of the CD, or my specific play list. So for example, using the information below: Ghostbusters - Ray Parker Jr. --- 5:23 (Just a guess) Phantom of the Opera Overture --- 3:55 (Another guess) Instead of 8:78, I'd want to see 9:18 Can this be done? Any help would be greatly appreciated. Thank you! -- Have a nice day! ~Paul Express Scripts, Charting the futu...

Insert calculated median field in pivottable
Anyone know how to get a median calculation in a pivot table? I've tried inserting a calculated field but it always sums the calculated field. Thanks, Joel Not supported in a pivot -- Regards, Peo Sjoblom (No private emails please) "Joel Schaefer" <joel@disintegrators.com> wrote in message news:ev4P0Nk6FHA.2616@TK2MSFTNGP15.phx.gbl... > Anyone know how to get a median calculation in a pivot table? I've tried > inserting a calculated field but it always sums the calculated field. > > Thanks, > > Joel > ...

Not Windows but Chicago Hawks win Stanley Cup
Chicago Blackhawks defenseman Brent Seabrook kisses the Stanley Cup after the Blackhawks stunned the Philadelphia Flyers 4-3 in overtime, capturing their first championship in 49 years. As you might guess, Hockey's key competition is named after me. Just kidding. P.S. I didn't know hockey is so active during Summer time, it was 90 degrees here the past week and we're not far from Chicago. Stanley Starinski I have a goat on Route9, NJ at my farm! "Ibrahim Al-Qassam (Abdelaziz)" <IranWillRuleWorld@alibaba.ir> wrote in message news:hure3v\$...

Consolidating monthly financials in a report
Hello, I'm using A2003 to create an application that, in part, projects financial results over a flexible time period. The following are either input directly to a form, or calculated within a query based on that input: - Reporting period start date (month/year, directly from user input) - Activity Date (day/month/year, directly from user input) - Lag time to first revenue (# of months, directly from user input) - Up-front revenue amount (\$, calculated based on other user input) - Up-front revenue date (month/year, calculated based on activity date and lag time) - Recurring revenue am...

Javascript help, calculation whoes when calculating from a calculation....
I am having a strange issue with Javascript and I cannot see what the issue us? Essentially I need to be able to calculate two values, one is addition and the second is multiplication. I am getting some strange numbers. My code is at the bottom under the ------, here are the details. crmForm.all.estimatedvalue.DataValue = 10 crmForm.all.new_cfp_estrev_nextyr.DataValue = 10 crmForm.all.new_cfp_estrev_yrtwoplus.DataValue = 10 This should make totalestrev = 30, Then its getting weird, I am taking the following formula (10/100)*30 = 270? Here 10 is the value selected from the drop down value, I ...

calculator errors
when i enter an equation into a cell such as: =product(a1,b1) into cell c1. If a1 is 1000 and b1 is .10 than c1 should equal 100, but it equals 102.04. My calculator is off somehow when i try to multiply. Please help me. Thank You, Kat I'd take a look at the values in A1 and B1. Are they really 1000 and .10 or are they 1000.49999 or .10444 (for example) "Kat and the Calculator" <KatandtheCalculator@discussions.microsoft.com> wrote in message news:591A3F6E-7C20-4C88-B1E2-6B76CFF502BA@microsoft.com... > when i enter an equation into a cell such as: =product(a...

Calculating Employee hours for the current week
Hello, I am new to excel and have been assigned the task of creating a file that breaks down the amount of time each of our employees spends on different projects. Most importantly I want to create a rollup sheet that shows the total number of hours all the employees have spent on the different projects (there are 6) for the current week. Is there any way for excel to figure out the current week then add together the hours all the employees worked on these 6 projects? Thanks in advance. Hi, Take a look at the templates available from Microsoft at http://office.microsoft.com/en-us/template...

documents in transaction inquiry should default to date
When first entering the Payables Transaction Inquiry - Vendors screen, the documents section is defaulted to "by document number." It would be extremely helpful to have the option of being able to change the Documents default to "by Document Date." ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and the...

What does this calculation do?!
I am working with a colleague to create a spreadsheet to rank supervisor performance through several aspects of the average performance of their employees. We have been given a similar spreadsheet as an example of what is needed. I am looking at it, and initially cannot understand what in the world some of the calcuations are meant to do. Here is one that is meant to calculate the "ranking score." It is a percentage determined by a target percentage and the person's actual performance percentage: =IF(IF(C3>0,(C3/B3),200)>200,200,IF(C3>0,(C3/B3),200)) As far as I ...