I need to be able to calculate age in months, and round whatever remainder to the middle of the month (.5). I am calculating z-scores and percentiles for in a childhood obesity project. The DoB and Date of measurements must be converted to read anything from 142.0 to 142.9 as 142.5.
This value will be used to look up the the appropriate LMS (Box Cox, Median, and Standard Deviation) in another excel table. I have to be able to compute age in months so 142.5, 143.5, 144.5, 144.5 etc. It is just not rounding off to the nearest half month.
I was asked by a colleague how they could put a persons date of birth in one cell, todays date in another, and return their age in years and months. Accuracy to within a month. This is what I gave them.
=TRUNC((B1-A1)/365.25)&" Years "& ROUND(((B1-A1)/365.25-TRUNC((B1-A1)/365.25))*12,0)&" Months"
I am building a template to auto populate budget value by straight line based on task start/end date criteria. some tasks could give me correct duration distribution, but some don't. I am looking for If function, which could give me correct monthly allocation budget. Here is an example of what I am trying to achieve. task 0110 duration is from 09/15/07 to 05/24/08, duration month is 8. budget $34,465supposed to be allocated to 8 month starting from Sept, 07. but my if logic return 9 month instead.
Date entered Name Date of Birth (DOB) Occurrences of Name + DOB this Month Occurrences of Name + DOB within last 3 Months Occurrences of Name + DOB within last 6 Months
I can manage the occurrences this month but haven't a clue how to calculate the 3 and 6 months ones. I have attached a sheet.
I'm trying to make a formula that will calculate the average of the previous 12months. The goal is to tie the formula to a reference cell that contains a date. Each time the date is changed by a user the calculation will be updated accordingly. Here is the CSE formula that I thought would work:
I've also attached a sample file to illustrate the problem. The 'range' portion ($C$5,(COUNT(C5:$C$53)-1)[/b]of the Offset function was setup simply to get the 12 months which preceeded the reference date.
Start date: 12/04/2004 End date: 12/04/2006 The formula should give the answer to 24 months
Example 2 Start date: 12/04/2004 End date: 13/04/2006 The formula should give the answer to 25 months
When I use function =(YEAR(A4)-YEAR(A3))*12+MONTH(A4)-MONTH(A3), it does not show 25 months for "Example 2" as it is still within the same month "April"
I have two columns with dates (and times) in that I am trying to define how many days, hrs and mins have elapsed i.e. A1 has 12/12/06 21:00, B1 has 17/12/06 21:00. C1 has B1-A1 and is custom formatted to show as dd"days" hh"hrs" mm"mins". In this case it will therefore show as 5days 0hrs 0mins. Which is correct.
However, if more than 1month has elapsed then the format m"m" d"days" h"hrs" m"mins" does not work. For example 17/03/06 03:00 to 20/12/06 07:00 shows as 10m 4days 4hrs 00min, which it clearly isn't.
I know the reason it does this is because it calculates the difference between the two times and adds that to it's 0 value, which in my format is 01/01/1900 00:00. therefore when it adds 277days (the answer) it becomes 04/10/1900 04:00, so my formatting is just calling the month value ('10') and the day value ('4').
I understand the reason it does this, 277 days on from 01/01/1900 is indeed Oct 4th, but 277 days on from 17/03/06 is not 10months and 4 days as there are different length months in between. It also seems to add a month on, possibly because the format for 'months' is between 1 & 12 and therefore cannot begin at 0?
Does anyone know if it's possible to force excel to work out the correct number of months and days have elapsed between two dates and not apply it to 01/01/1900? Or any other possible solution, maybe with a different custom format?
I have a large sheet of daily river flows and precipitation amounts, over 40+ years.
I want to calculate the average flows in each month of each year (ie 11/1968, 12/1968, 1/1969 etc). Dates are in Col A, flows in Col D.
How to average a particular month over all years like so:
{=AVERAGE(IF(MONTH(A2:A15282)=1,D2:D15282))}
But I don't know how to average per month of each year, or how to make a formula that will allow me to quickly calculate the averages of 100s of months.
I wrote code that works just fine, however, I realized there were parts of the data I was using that had 0's in it for holiday.
Bottom line, this is code that calculated the weighted average of prices for 12 months (12 rows across) and Drows across. I'm trying to use the "do while is empty" approach but can't get the syntax to work. Here's the code
Code: For r = 1 To drows Totwavg = 0 Tothours = 0 priceavg = 0
I am using the following formula to calculate years months and days in Excell 2007 =DATEDIF(C7,D7,"y") & " yrs, " & DATEDIF(C7,D7,"ym") & " mths, " & DATEDIF(C7,D7,"md") & " days"
I am working on a sheet that will allow a user to enter a start month (from a pre-defigned drop down list) and an end month (again from ddl). What I need to calculate is in what months the employee worked in so I can calculate their salary cost by quarter.
It can populate other cells in order to do the calculation if needed. So, for example if an employee started in May, and worked until December, I need to calculate that he worked 2 months in Q1, 3 months in Q2, 3 months in Q3, and 0 months in Q4. Our fiscal year is April to March.. ;-) I have thought of several options, but none of them have worked 100%.
In one column I'll have a list incrementing in 1w,2w,3w,1month and I want to be able to count the number of days that have elapsed till the latest cell. Right now I'm just winging it by saying there's always 31 days in one month using a COUNTA function, but I need it to be accurate.
I am looking for something to calculate values based on the past three months. I already have written a macro to retrieve all of the data and just need this as an add-on.
for example, lets say it is 5/31/2012. I have a row with dates going like
10/31/2010 11/31/2010 .........
I want the formula to calculate SUM(march+april+may row 68)/SUM(march+april+may row 59)
I have an input tab where I can select the month, say 5, and get the periods.
3/31/2012, 4/31/2012, 5/31/2012
if I changed the 5 to an 8 it would get 6/31/2012 7/31/2012 8/31/2012
I don't know if i need VBA for this but I am trying to have something to calculate this depending on the period selected in the input tab.
I am using excel 2010. I am thinking something with an offset function and maybe a loop? but still not sure.
I need to figure out a formula for cell F17 that will calculate a percentage change only for the months that have data in 2009. The way it is set up right now I have to go in every month and change the cell reference of the formula to include the latest data. Since the 2008 data is totally populated the formula gets messed up if I include the months of 2009 that have not yet occurred.
I have added 3 tables data .. also I had created a sample solution calc for emp1 and project1 ... I need to calculation the ratio between the months based on the working days and allocate the efforts accordingly.
I want to display the percentage of occupancy for each month for condo rentals.
I have columns with dates that represent bookings throughout the year. check in and check out dates to be more precise. (A1 and B1 for example) and I have columns with months Jan, Feb, etc. (C1, D1, etc. for example)
The problem I run in to is that I can calculate the number of days between the dates and the fraction of the year (*12 to get a monthly value, but I fail to understand how I can break that up so that I can populate each month with a correct percentage of the total term.
E.g. A1=1-jan-2014 and B1=20-jan-2014 is an easy one because it only covers 1 month: formula: =(YEARFRAC(A1,B1,3))*12 gives me 62,47% which I could just use as is for that month.
So far so good, but when the period covers more than one month or when the months overlaps, I don't know how to break the outcome up into the appropriate months to display the correct percentage for each month in its own column.
e.g. A1=1-jan-2014 and B1=20-Mar-2014 gives me a result of 253% with the same formula. 100% for November, 100% for December and 63% for January, which I could somehow formulate to break up over different Months.
But then it gets more tricky. What if the booking starts on a day other than the 1st of the Month?
e.g. A1=5-jan-2014 and B1=20-Mar-2014 The result of the formula (243%) is correct, but isn't sufficient to put the correct percentages for each month in their respective column.
What formula(s) should I use to break down the percentages to match the correct fraction of each individual month?
I attached an example of what I have so far for your review : test.xlsx
I need a formula that will calucalte the monthly total based on the following conditions:
Col A = Yearly Cost Col B = The number of the month when the costs are starting (1=Jan etc) Col C = The duration or the number of months for which the costs are to spread Col D is Year 2013 with the months across columns D-O. Row 1 above those columns shows the month's corresponding number.
Right now I have =IF($B3<=D$1,$A3/$C3,0) however if my start month is 1 and my duration is 5, I need the costs to stop after May. I've attached a sample file. Calculate based on start month and duration.xlsx
I have a start date for a contract in cell AM1. I need AN1 show a date six months from the start date in AM1. I am fine with that part.
However, I would like for AN1 to calculate not only a six-month date but also to auto-update to the next six month date from AM1 once the first six month date is about, let's say, one month past. What I am doing is calculating when a six-month inspection needs to be completed; these inspections are ongoing, so I need them to auto-update.
So let's say a contract was awarded today, 25 JAN 2010. That would be value in AM1.
I want AN1 to produce a date six months from 25 JAN 2010, which would be 25 JUL 2010 (yes, this way of calculating the six month date is fine). Then around, let's say, 25 AUG 2010, I want AN1 to auto-update to produce the next six month date, which would be 25 JAN 2011 (six months from 25 JUL). Obviously the function would need to relate to TODAY() in some way.
I need to sum data from the most recent 12 months. For example, on June 1, 2007 I want to find the total from June 1, 2006 to June 1,2007. On the 1st of the next month, July 1, 2007, I want to calculate the total from July 1, 2006 to July 1, 2007. I don't need to keep the total from month to month (on July 1, 2007, June's data is obsolete.)
I am working on yet another worksheet. To simplify the task, let's say I have to columns Date and Amount (several hundered entries). I need to be able to sum the first 60 consecutive months, that do not equal 60. Is there a way to use built-in excel formulas to do so, or would I have to create my own formula. I'm trying to stay away from a macro that is run manually.